summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/general/test_showModalDialog.html
diff options
context:
space:
mode:
authorathenian200 <athenian200@outlook.com>2020-01-27 22:59:08 -0600
committerathenian200 <athenian200@outlook.com>2020-01-27 22:59:08 -0600
commit3c4f414db74b84f7d2a6fb13fd888a47a153699b (patch)
treeea81fca559849967a79d598a6f460830762ec9ea /dom/tests/mochitest/general/test_showModalDialog.html
parent1f8d508258ac5d7d57fc4eb35cac90f28bc8ca03 (diff)
parentc4b0715baaffc541670fd1158557aa7e61e521d3 (diff)
downloadUXP-3c4f414db74b84f7d2a6fb13fd888a47a153699b.tar
UXP-3c4f414db74b84f7d2a6fb13fd888a47a153699b.tar.gz
UXP-3c4f414db74b84f7d2a6fb13fd888a47a153699b.tar.lz
UXP-3c4f414db74b84f7d2a6fb13fd888a47a153699b.tar.xz
UXP-3c4f414db74b84f7d2a6fb13fd888a47a153699b.zip
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into form-disabled-issue
Diffstat (limited to 'dom/tests/mochitest/general/test_showModalDialog.html')
-rw-r--r--dom/tests/mochitest/general/test_showModalDialog.html60
1 files changed, 0 insertions, 60 deletions
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>