diff options
Diffstat (limited to 'dom/tests/mochitest/bugs')
-rw-r--r-- | dom/tests/mochitest/bugs/file_bug291653.html | 28 | ||||
-rw-r--r-- | dom/tests/mochitest/bugs/file_bug504862.html | 22 | ||||
-rw-r--r-- | dom/tests/mochitest/bugs/mochitest.ini | 12 | ||||
-rw-r--r-- | dom/tests/mochitest/bugs/test_bug291653.html | 56 | ||||
-rw-r--r-- | dom/tests/mochitest/bugs/test_bug406375.html | 37 | ||||
-rw-r--r-- | dom/tests/mochitest/bugs/test_bug414291.html | 6 | ||||
-rw-r--r-- | dom/tests/mochitest/bugs/test_bug437361.html | 72 | ||||
-rw-r--r-- | dom/tests/mochitest/bugs/test_bug479143.html | 44 | ||||
-rw-r--r-- | dom/tests/mochitest/bugs/test_bug504862.html | 45 | ||||
-rw-r--r-- | dom/tests/mochitest/bugs/test_bug61098.html | 22 | ||||
-rw-r--r-- | dom/tests/mochitest/bugs/test_bug735237.html | 38 |
11 files changed, 0 insertions, 382 deletions
diff --git a/dom/tests/mochitest/bugs/file_bug291653.html b/dom/tests/mochitest/bugs/file_bug291653.html deleted file mode 100644 index 4bfc8337e..000000000 --- a/dom/tests/mochitest/bugs/file_bug291653.html +++ /dev/null @@ -1,28 +0,0 @@ -<html> - <head> - <script> - <!-- - function listener1() { - window.showModalDialog("data:text/html,<script>var maintest = opener.opener; opener.location = 'data:text/html,test'; maintest.end(); window.close();</script>"); - } - - function listener2() { - opener.secondListenerDidRun = true; - } - - window.addEventListener("foo", listener1); - window.addEventListener("foo", listener2); - - - function fireFoo() { - var e = document.createEvent("Events"); - e.initEvent("foo", true, true); - window.dispatchEvent(e); - } - //--> - </script> - </head> - <body onload="setTimeout(fireFoo, 0)"> - Test for bug 291653 - </body> -</html> diff --git a/dom/tests/mochitest/bugs/file_bug504862.html b/dom/tests/mochitest/bugs/file_bug504862.html deleted file mode 100644 index dc11ced6f..000000000 --- a/dom/tests/mochitest/bugs/file_bug504862.html +++ /dev/null @@ -1,22 +0,0 @@ -<html> -<body> -<script> -window.returnValue = 3; - -if (location.toString().match(/^http:\/\/mochi.test:8888/)) { - // Test that we got the right arguments. - opener.is(window.dialogArguments, "my args", - "dialog did not get the right arguments."); - - // Load a different url, and test that it sees the arguments (since it's same origin). - window.location="data:text/html,<html><body onload=\"opener.is(window.dialogArguments, 'my args', 'subsequent dialog document did not get the right arguments.'); close();\">';"; -} else { - // Post a message containing our arguments to the opener to test - // that this cross origing dialog does *not* see the passed in - // arguments. - opener.postMessage("args: " + window.dialogArguments, - "http://mochi.test:8888"); - - close(); -} -</script> diff --git a/dom/tests/mochitest/bugs/mochitest.ini b/dom/tests/mochitest/bugs/mochitest.ini index 309aab6e0..3743c6782 100644 --- a/dom/tests/mochitest/bugs/mochitest.ini +++ b/dom/tests/mochitest/bugs/mochitest.ini @@ -10,9 +10,6 @@ support-files = child_bug260264.html devicemotion_inner.html devicemotion_outer.html - file_bug291653.html - file_bug406375.html - file_bug504862.html file_bug593174_1.html file_bug593174_2.html file_bug809290_b1.html @@ -45,7 +42,6 @@ skip-if = toolkit == 'android' [test_bug260264_nested.html] [test_bug265203.html] [test_bug291377.html] -[test_bug291653.html] skip-if = toolkit == 'android' #TIMED_OUT [test_bug304459.html] [test_bug308856.html] @@ -67,28 +63,21 @@ skip-if = toolkit == 'android' #TIMED_OUT [test_bug396843.html] [test_bug400204.html] [test_bug404748.html] -[test_bug406375.html] -skip-if = toolkit == 'android' -[test_bug414291.html] -tags = openwindow [test_bug427744.html] skip-if = toolkit == 'android' [test_bug42976.html] [test_bug430276.html] -[test_bug437361.html] skip-if = toolkit == 'android' [test_bug440572.html] [test_bug456151.html] [test_bug458091.html] [test_bug459848.html] [test_bug465263.html] -[test_bug479143.html] skip-if = toolkit == 'android' [test_bug484775.html] [test_bug492925.html] [test_bug49312.html] [test_bug495219.html] -[test_bug504862.html] skip-if = toolkit == 'android' #RANDOM [test_bug529328.html] [test_bug531176.html] @@ -126,7 +115,6 @@ skip-if = toolkit == 'android' [test_bug698061.html] [test_bug698551.html] [test_bug707749.html] -[test_bug735237.html] [test_bug739038.html] [test_bug740811.html] [test_bug743615.html] diff --git a/dom/tests/mochitest/bugs/test_bug291653.html b/dom/tests/mochitest/bugs/test_bug291653.html deleted file mode 100644 index 1543cdd96..000000000 --- a/dom/tests/mochitest/bugs/test_bug291653.html +++ /dev/null @@ -1,56 +0,0 @@ -<!DOCTYPE HTML> -<html> -<!-- -https://bugzilla.mozilla.org/show_bug.cgi?id=291653 ---> -<head> - <title>Test for Bug 291653</title> - <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> - <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> -</head> -<body> -<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=291653">Mozilla Bug 291653</a> -<p id="display"></p> -<div id="content" style="display: none"> - -</div> -<pre id="test"> -<script type="application/javascript"> - -/** Test for Bug 291653 **/ -SimpleTest.waitForExplicitFinish(); -SimpleTest.requestFlakyTimeout("untriaged"); - -var secondListenerDidRun = false; - -var w; -function start() { - if ("showModalDialog" in window) { - w = window.open("file_bug291653.html", "foo", "width=300,height=300"); - } else { - // window.showModalDialog doesn't exist in e10s mode, nothing to do in this test. - ok(true, "nothing to do in e10s mode"); - SimpleTest.finish(); - } -} - -function closeTest() { - w.setTimeout("close()", 0); - setTimeout("finish()", 500); -} - -function finish() { - ok(!secondListenerDidRun, "Shouldn't have run second listener!"); - SimpleTest.finish(); -} - -function end() { - setTimeout("closeTest()", 500); -} - -start(); - -</script> -</pre> -</body> -</html> diff --git a/dom/tests/mochitest/bugs/test_bug406375.html b/dom/tests/mochitest/bugs/test_bug406375.html deleted file mode 100644 index 2cd459ffa..000000000 --- a/dom/tests/mochitest/bugs/test_bug406375.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE HTML> -<html> -<!-- -https://bugzilla.mozilla.org/show_bug.cgi?id=406375 ---> -<head> - <title>Test for Bug 406375</title> - <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> - <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> -</head> -<body onload="runTest()"> -<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=406375">Mozilla Bug 406375</a> -<p id="display"></p> -<div id="content" style="display: none"> - -</div> -<pre id="test"> -<script type="application/javascript"> - -/** Test for Bug 406375 **/ - - -SimpleTest.waitForExplicitFinish(); - -function runTest() { - if ("showModalDialog" in window) { - window.showModalDialog("file_bug406375.html"); - } - ok(true, "This test should not hang"); - - SimpleTest.finish(); -} - -</script> -</pre> -</body> -</html> diff --git a/dom/tests/mochitest/bugs/test_bug414291.html b/dom/tests/mochitest/bugs/test_bug414291.html index 883e52bb4..0ee5cb393 100644 --- a/dom/tests/mochitest/bugs/test_bug414291.html +++ b/dom/tests/mochitest/bugs/test_bug414291.html @@ -16,7 +16,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=414291 var result1 = 0; var result2 = 0; -var result3 = 0; window.open("data:text/html,<html><body onload='close(); opener.result1 = 1;'>", "w1"); is(result1, 0, "window should not be opened either as modal or loaded synchronously."); @@ -24,11 +23,6 @@ is(result1, 0, "window should not be opened either as modal or loaded synchronou window.open("data:text/html,<html><body onload='close(); opener.result2 = 2;'>", "w2", "modal=yes"); is(result2, 0, "window should not be opened either as modal or data loaded synchronously."); -if (window.showModalDialog) { - result3 = window.showModalDialog("data:text/html,<html><body onload='close(); returnValue = 3;'>"); - is(result3, 3, "window should be opened as modal."); -} - </script> </pre> </body> diff --git a/dom/tests/mochitest/bugs/test_bug437361.html b/dom/tests/mochitest/bugs/test_bug437361.html deleted file mode 100644 index ecc2cb08d..000000000 --- a/dom/tests/mochitest/bugs/test_bug437361.html +++ /dev/null @@ -1,72 +0,0 @@ -<!DOCTYPE HTML> -<html> -<!-- -https://bugzilla.mozilla.org/show_bug.cgi?id=437361 ---> -<head> - <title>Test for Bug 437361</title> - <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> - <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> - - <script class="testbody" type="text/javascript"> - - /** Test for Bug 437361 **/ - - function testModalDialogBlockedCleanly() { - is(true, SpecialPowers.getBoolPref("dom.disable_open_during_load"), "mozprefs sanity check"); - var rv = window.showModalDialog( // should be blocked without exception - "data:text/html,<html><body onload='close(); returnValue = 1;' /></html>"); - is(rv, null, "Modal dialog opened unexpectedly."); - } - - function testModalDialogAllowed() { - is(false, SpecialPowers.getBoolPref("dom.disable_open_during_load"), "mozprefs sanity check"); - var rv = window.showModalDialog( // should not be blocked this time - "data:text/html,<html><body onload='close(); returnValue = 1;' /></html>"); - is(rv, 1, "Problem with modal dialog returnValue."); - } - - function testOtherExceptionsNotTrapped() { - is(false, SpecialPowers.getBoolPref("dom.disable_open_during_load"), "mozprefs sanity check"); - window.showModalDialog('about:config'); // forbidden by SecurityCheckURL - } - - function test(disableOpen, exceptionExpected, testFn, errorMsg) { - if ("showModalDialog" in window) { - var oldPrefVal = SpecialPowers.getBoolPref("dom.disable_open_during_load"); - try { - SpecialPowers.setBoolPref("dom.disable_open_during_load", disableOpen); - testFn(); - ok(!exceptionExpected, errorMsg); - } catch (_) { - ok(exceptionExpected, errorMsg); - } - finally { - SpecialPowers.setBoolPref("dom.disable_open_during_load", oldPrefVal); - } - } else { - ok(true, "nothing to do in e10s mode"); - } - } - - test(true, false, testModalDialogBlockedCleanly, - "Blocked showModalDialog caused an exception."); - - test(false, false, testModalDialogAllowed, - "showModalDialog was blocked even though dom.disable_open_during_load was false."); - - test(false, true, testOtherExceptionsNotTrapped, - "Incorrectly suppressed insecure showModalDialog exception."); - - </script> -</head> -<body> -<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=437361">Mozilla Bug 437361</a> -<p id="display"></p> -<div id="content" style="display: none"> -</div> -<pre id="test"> -</pre> -</body> -</html> - diff --git a/dom/tests/mochitest/bugs/test_bug479143.html b/dom/tests/mochitest/bugs/test_bug479143.html deleted file mode 100644 index 03db4ddea..000000000 --- a/dom/tests/mochitest/bugs/test_bug479143.html +++ /dev/null @@ -1,44 +0,0 @@ -<!DOCTYPE html> -<html> -<!-- -https://bugzilla.mozilla.org/show_bug.cgi?id=479143 ---> -<head> - <title>Test for Bug 411103</title> - <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> - <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> -</head> -<body> -<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=479143">Mozilla Bug 479143</a> -<p id="display"></p> -<div id="content" style="display: none"></div> - -<pre id="test"> -<script class="testbody" type="text/javascript"> - - SimpleTest.waitForExplicitFinish(); - - setTimeout(function() { - if ("showModalDialog" in window) { - var interval = setInterval(function() { var i = 0; i++; }, 10); - - var xhr = new XMLHttpRequest(); - xhr.open("GET", "test_bug479143.html", false); - xhr.send(null); - - window.showModalDialog("javascript:" + - "setTimeout(function() { window.close(); }, 1000);", - null); - - clearInterval(interval); - } - - ok(true, "did not crash"); - - SimpleTest.finish(); - }, 0); - -</script> -</pre> -</body> -</html> diff --git a/dom/tests/mochitest/bugs/test_bug504862.html b/dom/tests/mochitest/bugs/test_bug504862.html deleted file mode 100644 index 713165bc3..000000000 --- a/dom/tests/mochitest/bugs/test_bug504862.html +++ /dev/null @@ -1,45 +0,0 @@ -<!DOCTYPE HTML> -<html> -<!-- -https://bugzilla.mozilla.org/show_bug.cgi?id=504862 ---> -<head> - <title>Test for Bug 504862</title> - <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> - <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> -</head> -<body onload="runTest()"> -<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=504862">Mozilla Bug 504862</a> -<script class="testbody" type="text/javascript"> - -/** Test for Bug 504862 **/ -SimpleTest.waitForExplicitFinish(); -function onMsgRcv(event) -{ - is(event.data, "args: undefined", "Unexpected cross origin dialog arguments."); -} - -function runTest() { - if ("showModalDialog" in window) { - window.addEventListener("message", onMsgRcv, false); - - var result = window.showModalDialog("file_bug504862.html", "my args"); - // NB: We used to clear returnValue on each navigation, but now we do a - // security check on access, so we can safely make returnValue live on - // the browsing context, per spec. - is(result, 3, "window sees previous dialog documents return value."); - - result = window.showModalDialog("http://test1.example.com/tests/dom/tests/mochitest/bugs/file_bug504862.html", "my args"); - - is(result, undefined, "Able to see return value from cross origin dialog."); - } else { - ok(true, "nothing to do in e10s mode"); - } - - SimpleTest.finish(); -} - -</script> -</pre> -</body> -</html> diff --git a/dom/tests/mochitest/bugs/test_bug61098.html b/dom/tests/mochitest/bugs/test_bug61098.html index 4c6ce967d..ed16e099b 100644 --- a/dom/tests/mochitest/bugs/test_bug61098.html +++ b/dom/tests/mochitest/bugs/test_bug61098.html @@ -306,28 +306,6 @@ function runtestsInner() w.close(); - // Test that showModalDialog() works normally and then gets blocked - // on the second call. - if (window.showModalDialog) { - w = window.open(); - w.showModalDialog("data:text/html,%3Cscript>window.close();%3C/script>") - is (promptState, void(0), "Wrong prompt state"); - - try { - w.showModalDialog("data:text/html,%3Cscript>window.close();%3C/script>") - ok(false, "showModalDialog call should throw an exception"); - } catch(e) { - is(e.name, "NS_ERROR_NOT_AVAILABLE", "Wrong exception"); - } - is (promptState.method, "confirm", "Wrong prompt method called"); - is (promptState.parent, w, "Wrong confirm parent"); - is (promptState.msg, "Prevent this page from creating additional dialogs", - "Wrong confirm message"); - promptState = void(0); - - w.close(); - } - mockPromptFactoryRegisterer.unregister(); mockPromptServiceRegisterer.unregister(); diff --git a/dom/tests/mochitest/bugs/test_bug735237.html b/dom/tests/mochitest/bugs/test_bug735237.html deleted file mode 100644 index e1a25a425..000000000 --- a/dom/tests/mochitest/bugs/test_bug735237.html +++ /dev/null @@ -1,38 +0,0 @@ -<!DOCTYPE HTML> -<html> -<!-- -https://bugzilla.mozilla.org/show_bug.cgi?id=735237 ---> -<head> - <title>Test for Bug 735237</title> - <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> - <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> -</head> -<body> -<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=735237">Mozilla Bug 735237</a> -<p id="display"></p> -<div id="content" style="display: none"> - -</div> -<pre id="test"> -<script class="testbody" type="text/javascript"> - -/** Test for Bug 735237 **/ - -SimpleTest.waitForExplicitFinish(); - -SpecialPowers.pushPrefEnv({"set": [["dom.disable_window_showModalDialog", true]]}, function() { - var caughtException = false; - try { - window.showModalDialog("http://example.com/"); - } catch (e) { - caughtException = true; - } - ok(caughtException, "showModalDialog should throw an exception"); - SimpleTest.finish(); -}); - -</script> -</pre> -</body> -</html> |