diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2020-01-21 20:00:48 -0500 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2020-01-21 21:36:54 -0500 |
commit | a9290ef91ec408fa7886b99cc59be40b413a0ce0 (patch) | |
tree | 1fa82c7349a85865717c83dedbba38aae87fe8b9 /dom/tests/mochitest/general | |
parent | 722161775b9ec9314d1b02f567e42b83115cf993 (diff) | |
download | UXP-a9290ef91ec408fa7886b99cc59be40b413a0ce0.tar UXP-a9290ef91ec408fa7886b99cc59be40b413a0ce0.tar.gz UXP-a9290ef91ec408fa7886b99cc59be40b413a0ce0.tar.lz UXP-a9290ef91ec408fa7886b99cc59be40b413a0ce0.tar.xz UXP-a9290ef91ec408fa7886b99cc59be40b413a0ce0.zip |
Issue #1366 - Completely remove showModalDialog
Diffstat (limited to 'dom/tests/mochitest/general')
-rw-r--r-- | dom/tests/mochitest/general/file_showModalDialog.html | 35 | ||||
-rwxr-xr-x | dom/tests/mochitest/general/mochitest.ini | 3 | ||||
-rw-r--r-- | dom/tests/mochitest/general/test_showModalDialog.html | 60 |
3 files changed, 0 insertions, 98 deletions
diff --git a/dom/tests/mochitest/general/file_showModalDialog.html b/dom/tests/mochitest/general/file_showModalDialog.html deleted file mode 100644 index 1cae0b1c0..000000000 --- a/dom/tests/mochitest/general/file_showModalDialog.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<script> - function go() { - is(SpecialPowers.wrap(window).location.toString(), location.toString(), "sanity"); - ok("returnValue" in window && "dialogArguments" in window, "We are modal"); - var iwin = document.getElementById('ifr').contentWindow; - is(SpecialPowers.Cu.getClassName(iwin, /* aUnwrap = */ true), "Window", "Descendant frames should not be modal"); - - if (location.origin != "http://mochi.test:8888") { - is(window.dialogArguments, undefined, - "dialogArguments should be undefined cross-origin: " + location.origin); - } - - window.returnValue = "rv: " + window.dialogArguments; - - // Allow for testing navigations in series. - if (location.search == "") { - window.close(); - } else { - var origins = location.search.split('?')[1].split(','); - var newsearch = '?' + origins.splice(1).join(','); - var newurl = location.toString().replace(location.origin, origins[0]) - .replace(location.search, newsearch); - location = newurl; - } - - } -</script> -</head> -<body onload="opener.postMessage('dosetup', '*');"> -<iframe id="ifr"></iframe> -</body> -</html> diff --git a/dom/tests/mochitest/general/mochitest.ini b/dom/tests/mochitest/general/mochitest.ini index d00ea1d4b..9f2fad785 100755 --- a/dom/tests/mochitest/general/mochitest.ini +++ b/dom/tests/mochitest/general/mochitest.ini @@ -9,7 +9,6 @@ support-files = file_interfaces.xml file_moving_nodeList.html file_moving_xhr.html - file_showModalDialog.html historyframes.html image_50.png image_100.png @@ -116,8 +115,6 @@ support-files = test_offsets.js [test_resource_timing_frameset.html] [test_selectevents.html] skip-if = toolkit == 'android' # bug 1230232 - Mouse doesn't select in the same way -[test_showModalDialog.html] -skip-if = e10s || toolkit == 'android' #Don't run modal tests on Android [test_showModalDialog_e10s.html] run-if = e10s [test_storagePermissionsAccept.html] diff --git a/dom/tests/mochitest/general/test_showModalDialog.html b/dom/tests/mochitest/general/test_showModalDialog.html deleted file mode 100644 index 511c79e63..000000000 --- a/dom/tests/mochitest/general/test_showModalDialog.html +++ /dev/null @@ -1,60 +0,0 @@ -<!DOCTYPE HTML> -<html> -<!-- -https://bugzilla.mozilla.org/show_bug.cgi?id=862918 ---> -<head> - <meta charset="utf-8"> - <title>Test for Bug 862918</title> - <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> - <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> - <script type="application/javascript"> - - /** Test for window.showModalDialog. **/ - - // The modal window needs to touch Cu, which means that it needs - // SpecialPowers. But given the semantics of modal windows, we have to - // do some funny stuff with postMessage to set this up. - window.onmessage = function(evt) { - is(evt.data, 'dosetup', "message from modal window is correct"); - var win = SpecialPowers.wrap(evt.source); - win.wrappedJSObject.SpecialPowers = SpecialPowers; - SpecialPowers.setWrapped(win.wrappedJSObject, 'is', SpecialPowers.wrap(is)); - SpecialPowers.setWrapped(win.wrappedJSObject, 'ok', SpecialPowers.wrap(ok)); - win.wrappedJSObject.go(); - }; - - var someObj = { foo: 42, bar: "hi"}; - var xurl = location.toString() - .replace('mochi.test:8888', 'example.org') - .replace('test_showModal', 'file_showModal'); - if (xurl.indexOf('?') != -1) - xurl = xurl.substring(0, xurl.indexOf('?')); - is(showModalDialog('file_showModalDialog.html'), "rv: undefined"); - is(showModalDialog(xurl), undefined); - is(showModalDialog('file_showModalDialog.html', 3), "rv: 3"); - is(showModalDialog(xurl, 3), undefined); - is(showModalDialog('file_showModalDialog.html', someObj), "rv: " + someObj); - is(showModalDialog(xurl, someObj), undefined); - - // Test sequential navigations. - is(showModalDialog('file_showModalDialog.html?http://mochi.test:8888', 4), - 'rv: 4'); - is(showModalDialog('file_showModalDialog.html?http://example.com', 4), undefined); - is(showModalDialog('file_showModalDialog.html?http://example.com,http://mochi.test:8888', 4), 'rv: 4'); - - // This test used to assert after gc. Make sure it doesn't. - SpecialPowers.gc(); - - </script> -</head> -<body> -<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=862918">Mozilla Bug 862918</a> -<p id="display"></p> -<div id="content" style="display: none"> - -</div> -<pre id="test"> -</pre> -</body> -</html> |