summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/xpath/complex-id.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/xpath/complex-id.html')
-rw-r--r--LayoutTests/fast/xpath/complex-id.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/LayoutTests/fast/xpath/complex-id.html b/LayoutTests/fast/xpath/complex-id.html
new file mode 100644
index 0000000..683e804
--- /dev/null
+++ b/LayoutTests/fast/xpath/complex-id.html
@@ -0,0 +1,31 @@
+<body>
+<p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=12452">bug 12452</a>:
+XPath id() function is not supported.</p>
+
+ <div id=test1 style="display:none">
+ a
+ </div>
+ <div id=test2 style="display:none">
+ b c
+ d
+ </div>
+
+ <div id="a"></div>
+ <div id="b"></div>
+ <div id="c"></div>
+ <div id="d"></div>
+
+<script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ var UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+
+ result = document.evaluate("id(id(' test1 test2 '))", document.body, null, UNORDERED_NODE_SNAPSHOT_TYPE, null);
+
+ if (4 == result.snapshotLength)
+ document.write("SUCCESS");
+ else
+ document.write("FAILURE: " + result.snapshotLength + " result nodes (should be 4)");
+</script>
+</body>