Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / tref-clone-crash.html
blob72779e1aa8f863b89aa3ac438fb3a4329377c445
1 <svg xmlns:xlink="http://www.w3.org/1999/xlink" onload="runTest()">
2 <defs>
3 <style id="style"/>
4 <text id="ref"></text>
5 </defs>
6 <g><use xlink:href="#ref"/></g>
7 <g><text><tref id="tref" xlink:href="#ref"/></text></g>
8 <script>
9 function gc() {
10 if (window.GCController)
11 GCController.collect();
12 else {
13 for (var i = 0; i < 10000; ++i)
14 new Object;
17 if (window.testRunner) {
18 testRunner.dumpAsText();
19 testRunner.waitUntilDone();
21 function runTest() {
22 var tref = document.getElementById("tref");
23 tref.cloneNode(true);
24 gc();
25 var elem = document.getElementById("style");
26 var parent = elem.parentNode;
27 parent.insertBefore(document.createElement("source"), elem);
28 document.body.innerHTML = "PASS";
29 if (window.testRunner)
30 testRunner.notifyDone();
32 </script>
33 </svg>