blob: dc11ced6ff7e800734ab1dacf98ef91de06f63f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<html>
<body>
<script>
window.returnValue = 3;
if (location.toString().match(/^http:\/\/mochi.test:8888/)) {
// Test that we got the right arguments.
opener.is(window.dialogArguments, "my args",
"dialog did not get the right arguments.");
// Load a different url, and test that it sees the arguments (since it's same origin).
window.location="data:text/html,<html><body onload=\"opener.is(window.dialogArguments, 'my args', 'subsequent dialog document did not get the right arguments.'); close();\">';";
} else {
// Post a message containing our arguments to the opener to test
// that this cross origing dialog does *not* see the passed in
// arguments.
opener.postMessage("args: " + window.dialogArguments,
"http://mochi.test:8888");
close();
}
</script>
|