Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xpath / id-simple.html
blob1a7a47e7563231e19b33c4d11a1fdbe555998f13
1 <html>
2 <head>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 var results = "";
8 var result;
9 var testNum = 1;
10 function init() {
11 var tests = [
12 "id('nested1')",
13 "id('nested1')/div[1]",
14 "id('nested1')//div[1]",
15 "id('nested1')/div[1]/input[2]",
16 "id('nested1')/div[1]//input[2]",
17 "id('nested1')//div[1]/input[2]",
18 "id('nested1')//div[1]//input[2]"
20 for (var i = 0; i < tests.length; i++) {
21 runXPath(tests[i]);
23 document.getElementById('results').innerHTML = results;
26 function runXPath(xpath) {
27 var result = document.evaluate(xpath, document, null, XPathResult.ANY_TYPE, null).iterateNext();
28 results += xpath + " " + (result ? "PASSED" : "FAILED") + ": " + result + "<br />";
30 </script>
31 </head>
32 <body onload="init()">
33 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=15380">bug 15380</a>:
34 XPath: id('foo') doesn't resolve correctly.</p>
35 <div id="nested1">
36 <div id="nested2">
37 <input id="nested3a" type="button" value="nested3a">
38 <input id="nested3b" type="button" value="nested3b">
39 </div>
40 </div>
41 <div id="results"></div>
42 </body>
43 </html>