diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/tests/mochitest/general/file_showModalDialog.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/tests/mochitest/general/file_showModalDialog.html')
-rw-r--r-- | dom/tests/mochitest/general/file_showModalDialog.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/dom/tests/mochitest/general/file_showModalDialog.html b/dom/tests/mochitest/general/file_showModalDialog.html new file mode 100644 index 000000000..1cae0b1c0 --- /dev/null +++ b/dom/tests/mochitest/general/file_showModalDialog.html @@ -0,0 +1,35 @@ +<!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> |