Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xpath / xpath-snapshot-result-should-mark-its-nodeset.html
blobaae0b63bbc6978383f87ee1f922651ab47ceb6a1
1 <html><head>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
6 var types = [ XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
7 XPathResult.ORDERED_NODE_SNAPSHOT_TYPE ];
9 function gc()
11 if (window.GCController)
12 return GCController.collect();
14 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
15 var s = new String("abc");
19 function test(type)
21 var result = document.evaluate("//div", document.documentElement, null, type, null);
22 result.snapshotItem(0).foo = "PASS";
23 document.body.removeChild(result.snapshotItem(0));
24 gc();
25 var console = document.getElementById("console");
26 console.appendChild(document.createTextNode(result.snapshotItem(0).foo));
27 console.appendChild(document.createElement("br"));
30 function tests()
32 while (types.length) {
33 test(types.pop());
36 </script>
37 </head>
38 <body onload="tests()">
39 <div></div>
40 <div></div>
41 <div> Test for bug <a href="https://bugs.webkit.org/show_bug.cgi?id=34231">34231</a>: Nodes in XPath result snapshots should keep JS wrappers alive.</div>
42 <div> For this test to PASS you should see 2 PASS below.</div><br>
43 <div id="console"></div>
44 </body></html>