Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <html>
2 <body>
3 <script>
4 window.returnValue = 3;
6 if (location.toString().match(/^http:\/\/mochi.test:8888/)) {
7 // Test that we got the right arguments.
8 opener.is(window.dialogArguments, "my args",
9 "dialog did not get the right arguments.");
11 // Load a different url, and test that it sees the arguments (since it's same origin).
12 window.location="data:text/html,<html><body onload=\"opener.is(window.dialogArguments, 'my args', 'subsequent dialog document did not get the right arguments.'); close();\">';";
13 } else {
14 // Post a message containing our arguments to the opener to test
15 // that this cross origing dialog does *not* see the passed in
16 // arguments.
17 opener.postMessage("args: " + window.dialogArguments,
18 "http://mochi.test:8888");
20 close();
21 }
22 </script>