|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=440572 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 440572</title> |
|
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
|
10 </head> |
|
11 <body onload="runtests()"> |
|
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=440572">Mozilla Bug 440572</a> |
|
13 |
|
14 <script class="testbody" type="text/javascript"> |
|
15 |
|
16 /** Test for Bug 440572 **/ |
|
17 |
|
18 var messages = []; |
|
19 |
|
20 function receiveMessage(e) |
|
21 { |
|
22 is(e.origin, "http://example.org", "wrong sender!"); |
|
23 messages.push(e.data); |
|
24 } |
|
25 |
|
26 window.addEventListener("message", receiveMessage, false); |
|
27 |
|
28 function runtests() |
|
29 { |
|
30 for (i in messages) { |
|
31 is(messages[i], "success", "test in frame failed."); |
|
32 } |
|
33 |
|
34 SimpleTest.finish(); |
|
35 } |
|
36 |
|
37 SimpleTest.waitForExplicitFinish(); |
|
38 </script> |
|
39 <br> |
|
40 <iframe name="test" src="http://example.org:80/tests/dom/tests/mochitest/bugs/iframe_bug440572.html"></iframe> |
|
41 <br> |
|
42 <iframe name="content" src="http://example.org:80/tests/dom/tests/mochitest/bugs/iframe_bug440572.html"></iframe> |
|
43 <br> |
|
44 <iframe name="dump" src="http://example.org:80/tests/dom/tests/mochitest/bugs/iframe_bug440572.html"></iframe> |
|
45 </body> |
|
46 </html> |
|
47 |