Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=592366 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test for Bug 592366</title> |
michael@0 | 8 | <script type="text/javascript" src="/MochiKit/MochiKit.js"></script> |
michael@0 | 9 | <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
michael@0 | 11 | </head> |
michael@0 | 12 | <body> |
michael@0 | 13 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=592366">Mozilla Bug 592366</a> |
michael@0 | 14 | <p id="display"></p> |
michael@0 | 15 | <div id="content" style="display: none"> |
michael@0 | 16 | <iframe></iframe> |
michael@0 | 17 | <iframe></iframe> |
michael@0 | 18 | </div> |
michael@0 | 19 | <pre id="test"> |
michael@0 | 20 | <script class="testbody" type="text/javascript"> |
michael@0 | 21 | |
michael@0 | 22 | /** Test for Bug 592366 **/ |
michael@0 | 23 | |
michael@0 | 24 | var gExecuted = false; |
michael@0 | 25 | |
michael@0 | 26 | function hitEventLoop(times, next) |
michael@0 | 27 | { |
michael@0 | 28 | if (times == 0) { |
michael@0 | 29 | next(); |
michael@0 | 30 | return; |
michael@0 | 31 | } |
michael@0 | 32 | |
michael@0 | 33 | SimpleTest.executeSoon(function() { |
michael@0 | 34 | hitEventLoop(times - 1, next); |
michael@0 | 35 | }); |
michael@0 | 36 | } |
michael@0 | 37 | |
michael@0 | 38 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 39 | addLoadEvent(function() { |
michael@0 | 40 | var s = document.createElement("script"); |
michael@0 | 41 | s.src = "data:text/javascript,parent.gExecuted=true;"; |
michael@0 | 42 | |
michael@0 | 43 | var iframes = document.getElementsByTagName("iframe"); |
michael@0 | 44 | |
michael@0 | 45 | iframes[0].contentDocument.body.appendChild(s); |
michael@0 | 46 | iframes[1].contentDocument.body.appendChild(s); |
michael@0 | 47 | |
michael@0 | 48 | // It seems to work with 1 event loop hit locally but using 2 given that it |
michael@0 | 49 | // was hsivonen advice. |
michael@0 | 50 | hitEventLoop(2, function() { |
michael@0 | 51 | ok(!gExecuted, "The scripts should not have been executed"); |
michael@0 | 52 | SimpleTest.finish(); |
michael@0 | 53 | }); |
michael@0 | 54 | }); |
michael@0 | 55 | |
michael@0 | 56 | </script> |
michael@0 | 57 | </pre> |
michael@0 | 58 | </body> |
michael@0 | 59 | </html> |