Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xpath / xpath-detached-iframe-resolver-crash.html
blobc0950cadb507ae8b1725d9b35b91f7212866b0aa
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 if (window.testRunner) {
6 testRunner.waitUntilDone();
7 testRunner.dumpAsText();
10 var dummyResolverCalled = false;
11 var foundNode;
12 function dummyResolver() {
13 dummyResolverCalled = true;
14 return "http://www.w3.org/1999/xhtml";
17 function test() {
18 var iframe = document.createElement("iframe");
19 document.body.appendChild(iframe);
20 var doc = iframe.contentWindow.document;
21 doc.open();
22 doc.write("<html><body><div></div></body></html>");
23 doc.close();
24 document.body.removeChild(iframe);
25 foundNode = doc.evaluate("//dummyns:div", doc, dummyResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
27 testPassed("Did not crash.");
28 shouldBeTrue("dummyResolverCalled");
29 shouldBe("foundNode.toString()", "\"[object HTMLDivElement]\"");
31 if (window.testRunner)
32 testRunner.notifyDone();
34 </script>
35 </head>
36 <body onload="test()">
37 <p>Ensure that using XPath namespace resolver with a detached iframe doesn't crash.</p>
38 <div id="console"></div>
39 </body>
40 </html>