OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script> |
| 3 if (window.testRunner) { |
| 4 testRunner.dumpAsText(); |
| 5 testRunner.waitUntilDone(); |
| 6 window.onload = function() { |
| 7 testRunner.displayAsyncThen(function() { |
| 8 mutateTree(); |
| 9 testRunner.displayAsyncThen(function() { |
| 10 testRunner.notifyDone(); |
| 11 }); |
| 12 }); |
| 13 }; |
| 14 } else { |
| 15 window.onload = function() { setTimeout(mutateTree, 100); }; |
| 16 } |
| 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)'); |
| 20 } |
| 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> |
OLD | NEW |