Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / pattern-3-step-cycle-dynamic-2.html
blob84175b15641050f1d4ea64e3eb5d1cee5027b7ba
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 // Add a reference from the rect in pattern#p3 to form a cycle.
19 document.getElementsByTagName('rect')[1].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" fill="url(#p1)"/>
25 <pattern id="p3" width="1" height="1">
26 <rect 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>