Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xpath / nsresolver-exception.xhtml
blob9b440c4093f21a67cc08ee36b7e12b0657e6fcfd
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" >
3 <head>
4 <title>Namespace Resolver Test Case</title>
5 </head>
6 <body>
7 <div id="result">FAILURE</div>
8 <script type="text/javascript"><![CDATA[
9 if (window.testRunner)
10 testRunner.dumpAsText();
12 function MyNSResolver() {}
13 MyNSResolver.prototype.lookupNamespaceURI = function(prefix) {
14 throw new Error("this is an exception");
17 var sXml = "<root xmlns='http://www.example.com'><child>SUCCESS</child></root>";
18 var oXmlDom = (new DOMParser()).parseFromString(sXml, "text/xml");
20 try {
22 var oResult = oXmlDom.evaluate("foo:child/text()", oXmlDom.documentElement, new MyNSResolver,
23 XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
25 } catch (ex) {
26 document.getElementById("result").textContent = "SUCCESS";
28 ]]></script>
30 </body>
31 </html>