1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 2 <html> 3 <head> 4 <link rel="stylesheet" href="../js/resources/js-test-style.css"> 5 <script src="../js/resources/js-test-pre.js"></script> 6 </head> 7 <body> 8 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=15437">bug 15437</a>: 9 XPath substring-after function is broken.</p> 10 <div id="console"></div> 11 12 <script> 13 shouldBe("document.evaluate(\"substring-after('abcde', 'd')\", document, null, XPathResult.STRING_TYPE, null).stringValue", "'e'"); 14 shouldBe("document.evaluate(\"substring-after('abcde', 'f')\", document, null, XPathResult.STRING_TYPE, null).stringValue", "''"); 15 shouldBe("document.evaluate(\"substring-after('abcde', '')\", document, null, XPathResult.STRING_TYPE, null).stringValue", "'abcde'"); 16 shouldBe("document.evaluate(\"substring-after('1999/04/01', '/')\", document, null, XPathResult.STRING_TYPE, null).stringValue", "'04/01'"); 17 shouldBe("document.evaluate(\"substring-after('1999/04/01', '19')\", document, null, XPathResult.STRING_TYPE, null).stringValue", "'99/04/01'"); 18 19 var successfullyParsed = true; 20 21 </script> 22 <script src="../js/resources/js-test-post.js"></script> 23 </body> 24 </html> 25