зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1086619 - Combine all mixed content blocker mochitests in one directory (r=tanvi,jst)
--HG-- rename : dom/base/test/bug803225_test_mailto.html => dom/base/test/mixedcontentblocker/bug803225_test_mailto.html rename : dom/base/test/file_mixed_content_frameNavigation.html => dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation.html rename : dom/base/test/file_mixed_content_frameNavigation_blankTarget.html => dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_blankTarget.html rename : dom/base/test/file_mixed_content_frameNavigation_grandchild.html => dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_grandchild.html rename : dom/base/test/file_mixed_content_frameNavigation_innermost.html => dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html rename : dom/base/test/file_mixed_content_frameNavigation_secure.html => dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_secure.html rename : dom/base/test/file_mixed_content_frameNavigation_secure_grandchild.html => dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_secure_grandchild.html rename : dom/base/test/file_mixed_content_main.html => dom/base/test/mixedcontentblocker/file_mixed_content_main.html rename : dom/base/test/file_mixed_content_main_bug803225.html => dom/base/test/mixedcontentblocker/file_mixed_content_main_bug803225.html rename : dom/base/test/file_mixed_content_main_bug803225_websocket_wsh.py => dom/base/test/mixedcontentblocker/file_mixed_content_main_bug803225_websocket_wsh.py rename : dom/base/test/file_mixed_content_server.sjs => dom/base/test/mixedcontentblocker/file_mixed_content_server.sjs rename : dom/base/test/test_mixed_content_blocker.html => dom/base/test/mixedcontentblocker/test_mixed_content_blocker.html rename : dom/base/test/test_mixed_content_blocker_bug803225.html => dom/base/test/mixedcontentblocker/test_mixed_content_blocker_bug803225.html rename : dom/base/test/test_mixed_content_blocker_frameNavigation.html => dom/base/test/mixedcontentblocker/test_mixed_content_blocker_frameNavigation.html
This commit is contained in:
Родитель
0bbf234774
Коммит
697cd1d03c
|
@ -12,7 +12,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
<div id="testContent"></div>
|
||||
|
||||
<script>
|
||||
var baseUrlHttps = "https://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html";
|
||||
var baseUrlHttps = "https://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html";
|
||||
|
||||
// For tests that require setTimeout, set the maximum polling time to 50 x 100ms = 5 seconds.
|
||||
var MAX_COUNT = 50;
|
||||
|
@ -44,7 +44,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
counter_test1++;
|
||||
return;
|
||||
}
|
||||
if (loc == "http://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html?insecurePage_navigate_child_response") {
|
||||
if (loc == "http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html?insecurePage_navigate_child_response") {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
|
@ -63,7 +63,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
|
||||
// Test 2: Navigate secure grandchild iframe to insecure grandchild iframe on a page that has no secure parents
|
||||
var iframe_test2 = document.createElement("iframe");
|
||||
iframe_test2.src = "http://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_grandchild.html"
|
||||
iframe_test2.src = "http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_grandchild.html"
|
||||
iframe_test2.onerror = function() {
|
||||
parent.postMessage({"test": "insecurePage_navigate_grandchild", "msg": "got an on error alert when loading or navigating testing iframe"}, "http://mochi.test:8888");
|
||||
};
|
|
@ -9,7 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=841850
|
|||
<title>Tests for Mixed Content Frame Navigation</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="http://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html?blankTarget" id="blankTarget" target="_blank">Go to http site</a>
|
||||
<a href="http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html?blankTarget" id="blankTarget" target="_blank">Go to http site</a>
|
||||
|
||||
<script>
|
||||
var blankTarget = document.getElementById("blankTarget");
|
|
@ -9,7 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
<title>Tests for Mixed Content Frame Navigation</title>
|
||||
</head>
|
||||
<body>
|
||||
<iframe src="https://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html?insecurePage_navigate_grandchild" id="child"></iframe>
|
||||
<iframe src="https://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html?insecurePage_navigate_grandchild" id="child"></iframe>
|
||||
|
||||
<script>
|
||||
// For tests that require setTimeout, set the maximum polling time to 50 x 100ms = 5 seconds.
|
||||
|
@ -32,7 +32,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
counter++;
|
||||
return;
|
||||
}
|
||||
if (loc == "http://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html?insecurePage_navigate_grandchild_response") {
|
||||
if (loc == "http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html?insecurePage_navigate_grandchild_response") {
|
||||
return;
|
||||
}
|
||||
else {
|
|
@ -9,7 +9,7 @@
|
|||
switch (type) {
|
||||
case "insecurePage_navigate_child":
|
||||
document.getElementById("content").innerHTML =
|
||||
'<a href="http://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html?insecurePage_navigate_child_response" id="link">Testing\<\/a>';
|
||||
'<a href="http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html?insecurePage_navigate_child_response" id="link">Testing\<\/a>';
|
||||
document.getElementById("link").click();
|
||||
break;
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
case "insecurePage_navigate_grandchild":
|
||||
document.getElementById("content").innerHTML =
|
||||
'<a href="http://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html?insecurePage_navigate_grandchild_response" id="link">Testing\<\/a>';
|
||||
'<a href="http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html?insecurePage_navigate_grandchild_response" id="link">Testing\<\/a>';
|
||||
document.getElementById("link").click();
|
||||
break;
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
case "securePage_navigate_child":
|
||||
document.getElementById("content").innerHTML =
|
||||
'<a href="http://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html?securePage_navigate_child_response" id="link">Testing\<\/a>';
|
||||
'<a href="http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html?securePage_navigate_child_response" id="link">Testing\<\/a>';
|
||||
document.getElementById("link").click();
|
||||
break;
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
|||
|
||||
case "securePage_navigate_grandchild":
|
||||
document.getElementById("content").innerHTML=
|
||||
'<a href="http://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html?securePage_navigate_grandchild_response" id="link">Testing\<\/a>';
|
||||
'<a href="http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html?securePage_navigate_grandchild_response" id="link">Testing\<\/a>';
|
||||
document.getElementById("link").click();
|
||||
break;
|
||||
|
|
@ -12,7 +12,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
<div id="testContent"></div>
|
||||
|
||||
<script>
|
||||
var baseUrl = "https://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html";
|
||||
var baseUrl = "https://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html";
|
||||
|
||||
// For tests that require setTimeout, set the maximum polling time to 50 x 100ms = 5 seconds.
|
||||
var MAX_COUNT = 50;
|
||||
|
@ -44,7 +44,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
counter_test1++;
|
||||
return;
|
||||
}
|
||||
if (loc == "http://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html?insecurePage_navigate_child_response") {
|
||||
if (loc == "http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html?insecurePage_navigate_child_response") {
|
||||
return;
|
||||
} else {
|
||||
if(counter_test1 < MAX_COUNT) {
|
||||
|
@ -62,7 +62,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
|
||||
// Test 2: Open an http page in a new tab from a link click with target=_blank.
|
||||
var iframe_test3 = document.createElement("iframe");
|
||||
iframe_test3.src = "https://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_blankTarget.html";
|
||||
iframe_test3.src = "https://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_blankTarget.html";
|
||||
iframe_test3.onerror = function() {
|
||||
parent.postMessage({"test": "blankTarget", "msg": "got an onerror event when loading or navigating testing iframe"}, "http://mochi.test:8888");
|
||||
};
|
|
@ -10,7 +10,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<iframe src="https://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html?securePage_navigate_grandchild" id="child"></iframe>
|
||||
<iframe src="https://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html?securePage_navigate_grandchild" id="child"></iframe>
|
||||
<script>
|
||||
// For tests that require setTimeout, set the maximum polling time to 50 x 100ms = 5 seconds.
|
||||
var MAX_COUNT = 50;
|
||||
|
@ -33,7 +33,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
counter++;
|
||||
return;
|
||||
}
|
||||
if (loc == "http://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_innermost.html?securePage_navigate_grandchild_response") {
|
||||
if (loc == "http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_innermost.html?securePage_navigate_grandchild_response") {
|
||||
return;
|
||||
}
|
||||
else {
|
|
@ -38,7 +38,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=62178
|
|||
-->
|
||||
|
||||
<script>
|
||||
var baseUrl = "http://example.com/tests/dom/base/test/file_mixed_content_server.sjs";
|
||||
var baseUrl = "http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_server.sjs";
|
||||
|
||||
//For tests that require setTimeout, set the maximum polling time to 100 x 100ms = 10 seconds.
|
||||
var MAX_COUNT = 100;
|
|
@ -112,7 +112,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=803225
|
|||
var webHandler = SpecialPowers.Cc["@mozilla.org/uriloader/web-handler-app;1"].
|
||||
createInstance(SpecialPowers.Ci.nsIWebHandlerApp);
|
||||
webHandler.name = "Web Handler";
|
||||
webHandler.uriTemplate = "http://example.com/tests/dom/base/test/bug803225_test_mailto.html?s=%";
|
||||
webHandler.uriTemplate = "http://example.com/tests/dom/base/test/mixedcontentblocker/bug803225_test_mailto.html?s=%";
|
||||
|
||||
var uri = ioService.newURI("mailto:foo@bar.com", null, null);
|
||||
webHandler.launchWithURI(uri);
|
||||
|
@ -144,7 +144,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=803225
|
|||
|
||||
// Test 8: wss protocol
|
||||
var wss;
|
||||
wss = new WebSocket("wss://example.com/tests/dom/base/test/file_mixed_content_main_bug803225_websocket");
|
||||
wss = new WebSocket("wss://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_main_bug803225_websocket");
|
||||
|
||||
var status_wss = "started";
|
||||
wss.onopen = function(e) {
|
|
@ -0,0 +1,20 @@
|
|||
[DEFAULT]
|
||||
support-files =
|
||||
bug803225_test_mailto.html
|
||||
file_mixed_content_frameNavigation.html
|
||||
file_mixed_content_frameNavigation_blankTarget.html
|
||||
file_mixed_content_frameNavigation_grandchild.html
|
||||
file_mixed_content_frameNavigation_innermost.html
|
||||
file_mixed_content_frameNavigation_secure.html
|
||||
file_mixed_content_frameNavigation_secure_grandchild.html
|
||||
file_mixed_content_main.html
|
||||
file_mixed_content_main_bug803225.html
|
||||
file_mixed_content_main_bug803225_websocket_wsh.py
|
||||
file_mixed_content_server.sjs
|
||||
|
||||
[test_mixed_content_blocker.html]
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED
|
||||
[test_mixed_content_blocker_bug803225.html]
|
||||
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED
|
||||
[test_mixed_content_blocker_frameNavigation.html]
|
||||
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED
|
|
@ -62,7 +62,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=62178
|
|||
}
|
||||
|
||||
function reloadFrame() {
|
||||
document.getElementById('framediv').innerHTML = '<iframe id="testHarness" src="https://example.com/tests/dom/base/test/file_mixed_content_main.html"></iframe>';
|
||||
document.getElementById('framediv').innerHTML = '<iframe id="testHarness" src="https://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_main.html"></iframe>';
|
||||
}
|
||||
|
||||
function checkTestsCompleted() {
|
|
@ -64,7 +64,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=803225
|
|||
changePrefs(counter);
|
||||
counter++;
|
||||
log("\nblockDisplay set to "+blockDisplay+", blockActive set to "+blockActive+".");
|
||||
document.getElementById('framediv').innerHTML = '<iframe id="testHarness" src="https://example.com/tests/dom/base/test/file_mixed_content_main_bug803225.html"></iframe>';
|
||||
document.getElementById('framediv').innerHTML = '<iframe id="testHarness" src="https://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_main_bug803225.html"></iframe>';
|
||||
}
|
||||
else {
|
||||
//set the prefs back to what they were set to originally
|
||||
|
@ -141,7 +141,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=803225
|
|||
|
||||
<body>
|
||||
<div id="framediv">
|
||||
<iframe id="testHarness" src="https://example.com/tests/dom/base/test/file_mixed_content_main_bug803225.html"></iframe>
|
||||
<iframe id="testHarness" src="https://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_main_bug803225.html"></iframe>
|
||||
</div>
|
||||
<pre id="log"></pre>
|
||||
</body>
|
|
@ -42,7 +42,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
// If we are here, all the insecure tests have run.
|
||||
// If we haven't changed the iframe to run the secure tests, change it now.
|
||||
if (!secureTestsStarted) {
|
||||
document.getElementById('testing_frame').src = "https://example.com/tests/dom/base/test/file_mixed_content_frameNavigation_secure.html";
|
||||
document.getElementById('testing_frame').src = "https://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation_secure.html";
|
||||
secureTestsStarted = true;
|
||||
}
|
||||
for (var prop in testsToRunSecure) {
|
||||
|
@ -64,7 +64,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
blockActive = SpecialPowers.getBoolPref("security.mixed_content.block_active_content");
|
||||
log("blockActive set to "+blockActive+".");
|
||||
secureTestsStarted = false;
|
||||
document.getElementById('framediv').innerHTML = '<iframe src="http://example.com/tests/dom/base/test/file_mixed_content_frameNavigation.html" id="testing_frame"></iframe>';
|
||||
document.getElementById('framediv').innerHTML = '<iframe src="http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation.html" id="testing_frame"></iframe>';
|
||||
}
|
||||
else {
|
||||
//set the prefs back to what they were set to originally
|
||||
|
@ -119,7 +119,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=840388
|
|||
|
||||
<body>
|
||||
<div id="framediv">
|
||||
<iframe src="http://example.com/tests/dom/base/test/file_mixed_content_frameNavigation.html" id="testing_frame"></iframe>
|
||||
<iframe src="http://example.com/tests/dom/base/test/mixedcontentblocker/file_mixed_content_frameNavigation.html" id="testing_frame"></iframe>
|
||||
</div>
|
||||
|
||||
<pre id="log"></pre>
|
|
@ -52,7 +52,6 @@ support-files =
|
|||
bug696301-script-1.js
|
||||
bug696301-script-1.js^headers^
|
||||
bug696301-script-2.js
|
||||
bug803225_test_mailto.html
|
||||
bug819051.sjs
|
||||
copypaste.js
|
||||
delayedServerEvents.sjs
|
||||
|
@ -180,16 +179,6 @@ support-files =
|
|||
file_htmlserializer_2_latin1.html
|
||||
file_htmlserializer_ipv6.html
|
||||
file_htmlserializer_ipv6_out.html
|
||||
file_mixed_content_frameNavigation.html
|
||||
file_mixed_content_frameNavigation_blankTarget.html
|
||||
file_mixed_content_frameNavigation_grandchild.html
|
||||
file_mixed_content_frameNavigation_innermost.html
|
||||
file_mixed_content_frameNavigation_secure.html
|
||||
file_mixed_content_frameNavigation_secure_grandchild.html
|
||||
file_mixed_content_main.html
|
||||
file_mixed_content_main_bug803225.html
|
||||
file_mixed_content_main_bug803225_websocket_wsh.py
|
||||
file_mixed_content_server.sjs
|
||||
file_mozfiledataurl_audio.ogg
|
||||
file_mozfiledataurl_doc.html
|
||||
file_mozfiledataurl_img.jpg
|
||||
|
@ -691,12 +680,6 @@ skip-if = (toolkit == 'android' && processor == 'x86') #x86 only bug 936226
|
|||
[test_meta_viewport4.html]
|
||||
[test_meta_viewport5.html]
|
||||
[test_meta_viewport6.html]
|
||||
[test_mixed_content_blocker.html]
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED
|
||||
[test_mixed_content_blocker_bug803225.html]
|
||||
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED
|
||||
[test_mixed_content_blocker_frameNavigation.html]
|
||||
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT, SSL_REQUIRED
|
||||
[test_mozfiledataurl.html]
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #TIMED_OUT
|
||||
[test_mozMatchesSelector.html]
|
||||
|
|
|
@ -20,6 +20,7 @@ GeckoCppUnitTests([
|
|||
MOCHITEST_MANIFESTS += [
|
||||
'chrome/mochitest.ini',
|
||||
'csp/mochitest.ini',
|
||||
'mixedcontentblocker/mochitest.ini',
|
||||
'mochitest.ini',
|
||||
'websocket_hybi/mochitest.ini',
|
||||
]
|
||||
|
|
Загрузка…
Ссылка в новой задаче