Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / pattern-3-step-cycle-dynamic-1.html
blobdbe549f647d59bebcc5b0ca8635008b5f09e42b4
1 <!DOCTYPE html>
2 <script>
3 if (window.testRunner) {
4 testRunner.dumpAsText();
5 testRunner.waitUntilDone();
6 window.onload = function() {
7 testRunner.layoutAndPaintAsyncThen(function() {
8 mutateTree();
9 testRunner.layoutAndPaintAsyncThen(function() {
10 testRunner.notifyDone();
11 });
12 });
14 } else {
15 window.onload = function() { setTimeout(mutateTree, 100); };
17 function mutateTree() {
18 // A reference from the 'rect' to the pattern cycle.
19 document.getElementsByTagName('rect')[0].setAttribute('fill', 'url(#p1)');
21 </script>
22 <p>PASS if no crash (stack overflow).</p>
23 <svg width="100" height="100">
24 <rect width="100" height="100"/>
25 <pattern id="p3" width="1" height="1">
26 <rect fill="url(#p1)" width="100" height="100"/>
27 </pattern>
28 <pattern id="p2" width="1" height="1">
29 <rect fill="url(#p3)" width="100" height="100"/>
30 </pattern>
31 <pattern id="p1" width="1" height="1">
32 <rect fill="url(#p2)" width="100" height="100"/>
33 </pattern>
34 </svg>