Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=583889
5 -->
6 <head>
7 <title>Test for Bug 583889</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=583889">Mozilla Bug 583889</a>
13 <iframe id="inner" style="width: 10px; height: 10px;"></iframe>
14 <pre id="test">
15 <script type="application/javascript;version=1.8">
17 /** Test for Bug 583889 **/
18 SimpleTest.waitForExplicitFinish();
20 function grabEventAndGo(event) {
21 gen.send(event);
22 }
24 function runTest() {
25 window.onload = grabEventAndGo;
26 // Wait for onLoad event.
27 yield;
29 var inner = $("inner");
30 inner.src = "bug583889_inner1.html";
31 window.onmessage = grabEventAndGo;
32 // Wait for message from 'inner' iframe.
33 event = yield;
35 while (event.data != "done") {
36 data = JSON.parse(event.data);
37 is(data.top, 300, "should remain at same top");
38 is(data.left, 300, "should remain at same left");
40 // Wait for message from 'inner' iframe.
41 event = yield;
42 }
44 // finish(), yet let the test actually end first, to be safe.
45 SimpleTest.executeSoon(SimpleTest.finish);
46 // "End" generator.
47 yield;
48 }
50 var gen = runTest();
51 gen.next();
52 </script>
53 </pre>
54 </body>
55 </html>