Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xpath / xpath-iterator-result-should-mark-its-nodeset.html
blob56760a6e3f18086073814f1a69da8fc6021bc9ae
1 <html><head>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
6 var types = [
7 XPathResult.ORDERED_NODE_ITERATOR_TYPE,
8 XPathResult.UNORDERED_NODE_ITERATOR_TYPE
9 ];
11 function gc()
13 if (window.GCController)
14 return GCController.collect();
16 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
17 var s = new String("abc");
21 function test(type)
23 var doc = (new DOMParser).parseFromString("<html><body><span></span></body></html>", "text/xml");
24 doc.getElementsByTagName("span")[0].foo = "PASS";
25 var result = doc.evaluate("//span", doc.documentElement, null, type, null);
26 doc = 0;
27 gc();
28 var console = document.getElementById("console");
29 console.appendChild(document.createTextNode(result.iterateNext().foo));
30 console.appendChild(document.createElement("br"));
33 function tests()
35 while (types.length) {
36 test(types.pop());
39 </script>
40 </head>
41 <body onload="tests()">
42 <div> Test for bug <a href="https://bugs.webkit.org/show_bug.cgi?id=34231">34231</a>: Nodes in XPathResult should keep JS wrappers alive.</div>
43 <div> For this test to PASS you should see 2 PASS below.</div><br>
44 <div id="console"></div>
45 </body></html>