summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/xpath/ensure-null-namespace.xhtml
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/xpath/ensure-null-namespace.xhtml')
-rw-r--r--LayoutTests/fast/xpath/ensure-null-namespace.xhtml22
1 files changed, 22 insertions, 0 deletions
diff --git a/LayoutTests/fast/xpath/ensure-null-namespace.xhtml b/LayoutTests/fast/xpath/ensure-null-namespace.xhtml
new file mode 100644
index 0000000..c0cd4ff
--- /dev/null
+++ b/LayoutTests/fast/xpath/ensure-null-namespace.xhtml
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title/>
+ </head>
+ <body>
+ <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=12581">bug 12581</a>:
+ XPath //title shouldn't match &lt;title> in XHTML.</p>
+ <div id="result">FAILURE: script did't run</div>
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ var result = document.evaluate("//title", document.documentElement, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+ if (result.snapshotLength == 0)
+ document.getElementById("result").firstChild.nodeValue = "SUCCESS";
+ else
+ document.getElementById("result").firstChild.nodeValue = "FAILURE: " + result.snapshotLength + " node(s) matched - should be 0";
+ </script>
+ </body>
+</html>