Chromium Code Reviews| Index: LayoutTests/fast/dom/StyleSheet/stylesheet-move-between-documents-crash.html |
| diff --git a/LayoutTests/fast/dom/StyleSheet/stylesheet-move-between-documents-crash.html b/LayoutTests/fast/dom/StyleSheet/stylesheet-move-between-documents-crash.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..402be02da0d9194d3aa1711c81a4807a9d534931 |
| --- /dev/null |
| +++ b/LayoutTests/fast/dom/StyleSheet/stylesheet-move-between-documents-crash.html |
| @@ -0,0 +1,53 @@ |
| +<script> |
| +if (window.testRunner) |
| + testRunner.waitUntilDone(); |
| + |
| +var iframe; |
| +var div; |
| + |
| +function start() { |
| + iframe = document.createElement('iframe'); |
| + iframe.src='resources/stylesheet-move-iframe1.xml'; |
| + document.getElementById('store_div').appendChild(iframe); |
| + window.setTimeout('startrly()', 100); |
| +} |
| + |
| +function startrly() { |
| + if (location.hash == '#done') { |
| + document.write('PASS'); |
| + if (window.testRunner) { |
| + testRunner.dumpAsText(); |
| + testRunner.notifyDone(); |
| + } |
| + return; |
| + } |
| + var count = 0; |
| + if (location.hash !== "") |
| + count = parseInt(location.hash.substr(1)); |
| + if (count < 10) { |
| + ++count; |
| + location.hash = '#' + count; |
| + } else { |
| + location.hash = 'done'; |
| + } |
| + div = document.createElement('div'); |
| + // <marquee> is special as it is implemented using Blink-in-JS (JS code runs for |
| + // creating a custom element and a shadow root) and invokes its attachedCallback |
| + // from C++ code, which can cause a special race condition with reloading when |
| + // it is moved between different documents. |
| + marquee = document.createElement('marquee'); |
|
hayato
2014/11/19 10:52:15
Looks 'var' is missing for marquee.
kochi
2014/11/19 11:41:52
Done.
|
| + document.body.appendChild(marquee); |
| + document.body.scrollIntoView(false); |
| + |
| + var iframe2 = document.createElement('iframe'); |
| + iframe2.src='resources/stylesheet-move-iframe2.html'; |
|
hayato
2014/11/19 10:52:15
spaces around '='.
kochi
2014/11/19 11:41:52
Done.
|
| + document.body.appendChild(iframe2); |
| + |
| + document.body.appendChild(iframe.contentDocument.firstChild); |
| + div.appendChild(marquee); |
| + window.setTimeout('location.reload();',20); |
| +} |
| +</script> |
| +<body onload="start()"> |
| +<div id="store_div"></div> |
| +</script> |