Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xpath / evaluate-twice.html
blobc4f68e1fb41e39aa071ac89b5c00a64e526b92fa
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <div id="console"></div>
9 <script>
10 doc = (new DOMParser).parseFromString("<doc><elem>1</elem><elem>2</elem></doc>", "application/xml");
12 expr = doc.createExpression("1", null);
14 shouldBe("expr.evaluate(doc.documentElement.firstChild, XPathResult.STRING_TYPE, null).stringValue", "'1'");
15 shouldBe("expr.evaluate(doc.documentElement.firstChild.nextSibling, XPathResult.STRING_TYPE, null).stringValue", "'1'");
17 expr = doc.createExpression(".", null);
19 shouldBe("expr.evaluate(doc.documentElement.firstChild, XPathResult.STRING_TYPE, null).stringValue", "'1'");
20 shouldBe("expr.evaluate(doc.documentElement.firstChild.nextSibling, XPathResult.STRING_TYPE, null).stringValue", "'2'");
22 expr = doc.createExpression("string(.)", null);
24 shouldBe("expr.evaluate(doc.documentElement.firstChild, XPathResult.STRING_TYPE, null).stringValue", "'1'");
25 shouldBe("expr.evaluate(doc.documentElement.firstChild.nextSibling, XPathResult.STRING_TYPE, null).stringValue", "'2'");
27 expr = doc.createExpression("1 + .", null);
29 shouldBe("expr.evaluate(doc.documentElement.firstChild, XPathResult.NUMBER_TYPE, null).numberValue", "2");
30 shouldBe("expr.evaluate(doc.documentElement.firstChild.nextSibling, XPathResult.NUMBER_TYPE, null).numberValue", "3");
32 </script>
33 </body>
34 </html>