Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xpath / reverse-axes.html
blob721b752661262ccc990befb5fdcb58897e4230a7
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script src="xpath-test-pre.js"></script>
6 </head>
7 <body>
8 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=15436">bug 15436</a>:
9 Wrong proximity positions for XPath reverse axes.</p>
11 <div id="d">
12 <div id="d1"></div>
13 <div id="d2">
14 <div id="d21"></div>
15 </div>
16 <div id="d3">
17 <div id="d31"></div>
18 </div>
19 </div>
21 <div id="console"></div>
23 <script>
25 shouldBe("document.evaluate('preceding-sibling::*[1]', document.getElementById('d3'), null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.id", "'d2'");
27 shouldBe("document.evaluate('preceding::*[1]', document.getElementById('d31'), null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.id", "'d21'");
28 shouldBe("document.evaluate('preceding::*[2]', document.getElementById('d31'), null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.id", "'d2'");
29 shouldBe("document.evaluate('preceding::*[3]', document.getElementById('d31'), null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.id", "'d1'");
30 shouldBe("document.evaluate('preceding::*[4]', document.getElementById('d31'), null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.tagName", "'A'");
31 shouldBe("document.evaluate('preceding::*[5]', document.getElementById('d31'), null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.tagName", "'P'");
33 shouldBe("document.evaluate('ancestor::*[1]', document.getElementById('d31'), null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.id", "'d3'");
35 shouldBe("document.evaluate('ancestor-or-self::*[1]', document.getElementById('d31'), null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.id", "'d31'");
37 </script>
38 </body>
39 </html>