OLD | NEW |
(Empty) | |
| 1 <script> |
| 2 if (window.testRunner) |
| 3 testRunner.waitUntilDone(); |
| 4 |
| 5 var iframe; |
| 6 var div; |
| 7 |
| 8 function start() { |
| 9 iframe = document.createElement('iframe'); |
| 10 iframe.src='resources/stylesheet-move-iframe1.xml'; |
| 11 document.getElementById('store_div').appendChild(iframe); |
| 12 window.setTimeout('startrly()', 100); |
| 13 } |
| 14 |
| 15 function startrly() { |
| 16 if (location.hash == '#done') { |
| 17 document.write('PASS'); |
| 18 if (window.testRunner) { |
| 19 testRunner.dumpAsText(); |
| 20 testRunner.notifyDone(); |
| 21 } |
| 22 return; |
| 23 } |
| 24 var count = 0; |
| 25 if (location.hash !== "") |
| 26 count = parseInt(location.hash.substr(1)); |
| 27 if (count < 10) { |
| 28 ++count; |
| 29 location.hash = '#' + count; |
| 30 } else { |
| 31 location.hash = 'done'; |
| 32 } |
| 33 div = document.createElement('div'); |
| 34 // <marquee> is special as it is implemented using Blink-in-JS (JS code runs
for |
| 35 // creating a custom element and a shadow root) and invokes its attachedCall
back |
| 36 // from C++ code, which can cause a special race condition with reloading wh
en |
| 37 // it is moved between different documents. |
| 38 var marquee = document.createElement('marquee'); |
| 39 document.body.appendChild(marquee); |
| 40 document.body.scrollIntoView(false); |
| 41 |
| 42 var iframe2 = document.createElement('iframe'); |
| 43 iframe2.src = 'resources/stylesheet-move-iframe2.html'; |
| 44 document.body.appendChild(iframe2); |
| 45 |
| 46 document.body.appendChild(iframe.contentDocument.firstChild); |
| 47 div.appendChild(marquee); |
| 48 window.setTimeout('location.reload();',20); |
| 49 } |
| 50 </script> |
| 51 <body onload="start()"> |
| 52 <div id="store_div"></div> |
| 53 </script> |
OLD | NEW |