diff options
Diffstat (limited to 'LayoutTests/fast/xpath/implicit-node-args.html')
-rw-r--r-- | LayoutTests/fast/xpath/implicit-node-args.html | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/LayoutTests/fast/xpath/implicit-node-args.html b/LayoutTests/fast/xpath/implicit-node-args.html new file mode 100644 index 0000000..52df68a --- /dev/null +++ b/LayoutTests/fast/xpath/implicit-node-args.html @@ -0,0 +1,26 @@ +<html> + <body> + <div style="display:none">123</div> + <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=12602">bug 12602</a>: + </p> + <script> + if (window.layoutTestController) + layoutTestController.dumpAsText(); + + var tests = [ + "//div[string() = '123']" + , "//div[normalize-space() = '123']" + , "//div[string-length() = 3]" + , "//div[number() = 123]" + ]; + + while (test = tests.pop()) { + var result = document.evaluate(test, document.documentElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); + if (result.snapshotLength == 1) + document.write("<pre>" + test + ": SUCCESS</pre>"); + else + document.write("<pre>" + test + ": FAILURE. " + result.snapshotLength + " node(s) matched - should be 1</pre>"); + } + </script> + </body> +</html> |