Unverified Commit a01c0ae3 authored by boklm's avatar boklm
Browse files

Bug 13053: add a noscript test

parent cc8e5fe0
......@@ -265,7 +265,16 @@ our @tests = (
type => 'mozmill',
descr => 'Check that we have the default search engines set',
},
{
name => 'noscript',
type => 'mozmill',
descr => 'Check that noscript options are working',
retry => 1,
prefs => {
'extensions.torbutton.security_slider' => 3,
},
enable => sub { $_[0]->{version} !~ m/^4.0/ },
},
{
name => 'fp_screen_dimensions',
type => 'selenium',
......
......@@ -60,6 +60,7 @@ my %default_options = (
'mozmill-dir' => 'c:\tbbtestsuite\mozmill-env',
'http-proxy-port' => '8888',
test_data_url => 'http://test-data.tbb.torproject.org',
test_data_url_https => 'https://test-data.tbb.torproject.org',
test_data_dir => "$FindBin::Bin/test-data",
);
......
// https://trac.torproject.org/projects/tor/ticket/13053
"use strict";
var {expect} = require("../mozilla-mozmill-tests/lib/assertions");
var testsuite = require("../lib/testsuite");
var setupModule = function(aModule) {
aModule.controller = mozmill.getBrowserController();
}
var testNoscript = function () {
var http_url = testsuite.options.test_data_url + '/noscript/';
var https_url = testsuite.options.test_data_url_https + '/noscript/';
// http page sourcing http js
controller.open(http_url + 'http_src.html');
controller.waitForPageLoad();
controller.sleep(1000);
var f = new elementslib.ID(controller.window.document, "test_result");
expect.equal(null, f.getNode(), 'http src in http page');
// https page sourcing http js
controller.open(https_url + 'http_src.html');
controller.waitForPageLoad();
controller.sleep(1000);
var f = new elementslib.ID(controller.window.document, "test_result");
expect.equal(null, f.getNode(), 'http src in https page');
// http page sourcing https js
controller.open(http_url + 'https_src.html');
controller.waitForPageLoad();
controller.sleep(1000);
var f = new elementslib.ID(controller.window.document, "test_result");
expect.equal(null, f.getNode(), 'https src in http page');
// https page sourcing https js
controller.open(https_url + 'https_src.html');
controller.waitForPageLoad();
controller.sleep(1000);
var f = new elementslib.ID(controller.window.document, "test_result");
expect.equal('JavaScriptEnabled', f.getNode().innerHTML, 'https src in https page');
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment