4 https://bugzilla.mozilla.org/show_bug.cgi?id=637644
7 <title>Test for Bug
637644</title>
8 <script type=
"application/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <script type=
"text/javascript" src=
"/tests/SimpleTest/WindowSnapshot.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=637644">Mozilla Bug
637644</a>
15 <div id=
"content" style=
"display: none">
19 <script type=
"application/javascript">
21 /** Test for Bug
637644 **/
22 SimpleTest.waitForExplicitFinish();
24 addLoadEvent(function() {
25 var win1 = window.open(
"",
"",
"height=500,width=500");
26 win1.document.body.textContent =
"Should show";
28 var windowsLoaded =
0;
30 window.onmessage = function (ev) {
31 is(ev.data,
"loaded",
"Message should be 'loaded'");
32 if (++windowsLoaded ==
2) {
33 var one = snapshotWindow(win1);
34 var two = snapshotWindow(win2);
35 var three = snapshotWindow(win3);
39 ok(compareSnapshots(one, two, true)[
0],
"Popups should look identical");
40 ok(compareSnapshots(one, three, false)[
0],
"Popups should not look identical");
46 var win2 = window.open(
"data:text/html,<script>window.onload = function() { opener.postMessage('loaded', '*'); }</" + "script><body>Should show</body>", "", "height=500,width=500");
48 var win3
= window
.open("data:text/html,<script>window.onload = function() { opener.postMessage('loaded', '*'); }</" + "script><body></body>", "", "height=500,width=500");