summaryrefslogtreecommitdiffstats
path: root/dom/browser-element/mochitest/file_browserElement_Open1.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /dom/browser-element/mochitest/file_browserElement_Open1.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-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/browser-element/mochitest/file_browserElement_Open1.html')
-rw-r--r--dom/browser-element/mochitest/file_browserElement_Open1.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/dom/browser-element/mochitest/file_browserElement_Open1.html b/dom/browser-element/mochitest/file_browserElement_Open1.html
new file mode 100644
index 000000000..c74415e2e
--- /dev/null
+++ b/dom/browser-element/mochitest/file_browserElement_Open1.html
@@ -0,0 +1,34 @@
+<html>
+<body>
+<script>
+
+// Because this file is inside <iframe mozbrowser>, the alert() calls below
+// don't trigger actual dialogs. Instead, the document which contans the
+// iframe receives mozbrowsershowmodalprompt events, which the document uses
+// to determine test success/failure.
+
+function is(x, y, reason) {
+ if (x === y) {
+ alert("success: " + x + " === " + y + ", " + reason);
+ }
+ else {
+ alert("failure: " + x + " !== " + y + ", " + reason);
+ }
+}
+
+function ok(bool, reason) {
+ alert((bool ? "success: " : "failure: ") + reason);
+}
+
+// Send "dialog=1" as a test for bug 783644. It shouldn't have any effect.
+var w = window.open("file_browserElement_Open2.html", "name", "dialog=1");
+w.addEventListener("load", function() {
+ ok(true, "got load");
+ is(w.opener, window, 'opener property');
+ is(w.location.href, location.href.replace('Open1', 'Open2'), 'correct location');
+ is(w.document.getElementById('testElem').innerHTML, 'test', 'elem innerHTML');
+ alert("finish");
+});
+</script>
+</body>
+</html>