Index: LayoutTests/fast/html/marquee-clone-crash.html |
diff --git a/LayoutTests/fast/html/marquee-clone-crash.html b/LayoutTests/fast/html/marquee-clone-crash.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..91e322ae16c15c2e0dd4fde71c41a2603ccec2a0 |
--- /dev/null |
+++ b/LayoutTests/fast/html/marquee-clone-crash.html |
@@ -0,0 +1,61 @@ |
+<!DOCTYPE html> |
+<script> |
+var ex = false; |
+var doc; |
+var count = 0; |
+ |
+if (window.testRunner) |
+ testRunner.waitUntilDone(); |
+ |
+function start() { |
+ if (location.hash == "") { |
+ location.hash = "#0"; |
+ } else { |
+ count = parseInt(location.hash.substring(1)); |
+ if (count >= 5) { |
+ document.write('PASS'); |
+ if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.notifyDone(); |
+ } |
+ return; |
+ } |
+ } |
+ |
+ doc = document.documentElement; |
+ mq1 = document.createElement('marquee'); |
+ var iframe = document.createElement('iframe'); |
+ iframe.src = "nonexistent"; |
+ |
+ doc.appendChild(iframe); |
+ mq2 = mq1.cloneNode(false); |
+ |
+ iframe.onload = iframe_onload; |
+ setTimeout('start_pause1()', 100); |
+} |
+ |
+function start_pause1() { |
+ document.removeChild(doc); |
+ document.appendChild(doc); |
+ setTimeout('start_pause2()', 100); |
+} |
+ |
+function start_pause2() { |
+ document.removeChild(doc); |
+ gc(); |
+ document.appendChild(doc); |
+ location.hash = '#' + ++count; |
+ location.reload(); |
+} |
+ |
+function iframe_onload() { |
+ if (ex) |
+ return; |
+ ex = true; |
+ |
+ var iframe = document.createElement('iframe'); |
+ iframe.src='resources/marquee-crash.svg'; |
+ doc.appendChild(iframe); |
+} |
+</script> |
+<body onload="start()"></body> |