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 <div id="console"></div> 9 10 <script> 11 shouldBe('document.evaluate(\'""\', document, null, XPathResult.STRING_TYPE, null).stringValue', '""'); 12 shouldBe('document.evaluate(\'"Hi"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"Hi"'); 13 shouldBe('document.evaluate(\'"NaN"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"NaN"'); 14 shouldBe('document.evaluate(\'"\u2022 = middle dot"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"\u2022 = middle dot"'); 15 shouldBe('document.evaluate(\'"0"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"0"'); 16 shouldBe('document.evaluate(\'"1"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"1"'); 17 shouldBe('document.evaluate(\'"2"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"2"'); 18 shouldBe('document.evaluate(\'"3"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"3"'); 19 shouldBe('document.evaluate(\'"4"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"4"'); 20 shouldBe('document.evaluate(\'"5"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"5"'); 21 shouldBe('document.evaluate(\'"31"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"31"'); 22 shouldBe('document.evaluate(\'"-1"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"-1"'); 23 shouldBe('document.evaluate(\'"-2"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"-2"'); 24 shouldBe('document.evaluate(\'"-3"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"-3"'); 25 shouldBe('document.evaluate(\'"-4"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"-4"'); 26 shouldBe('document.evaluate(\'"-5"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"-5"'); 27 shouldBe('document.evaluate(\'"3.1415926535"\', document, null, XPathResult.STRING_TYPE, null).stringValue', '"3.1415926535"'); 28 29 shouldBe('document.evaluate(\'0\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '0.0'); 30 shouldBe('document.evaluate(\'0.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '0.5'); 31 shouldBe('document.evaluate(\'-0.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-0.5'); 32 shouldBe('document.evaluate(\'1\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '1.0'); 33 shouldBe('document.evaluate(\'-1\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-1.0'); 34 shouldBe('document.evaluate(\'1.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '1.5'); 35 shouldBe('document.evaluate(\'-1.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-1.5'); 36 shouldBe('document.evaluate(\'2\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '2.0'); 37 shouldBe('document.evaluate(\'-2\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-2.0'); 38 shouldBe('document.evaluate(\'2.6\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '2.6'); 39 shouldBe('document.evaluate(\'-2.6\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-2.6'); 40 shouldBe('document.evaluate(\'3\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '3.0'); 41 shouldBe('document.evaluate(\'-3\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-3.0'); 42 shouldBe('document.evaluate(\'31\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '31.0'); 43 shouldBe('document.evaluate(\'4\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '4.0'); 44 shouldBe('document.evaluate(\'-4\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-4.0'); 45 shouldBe('document.evaluate(\'4.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '4.5'); 46 shouldBe('document.evaluate(\'-4.5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-4.5'); 47 shouldBe('document.evaluate(\'5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '5.0'); 48 shouldBe('document.evaluate(\'-5\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-5.0'); 49 shouldBe('document.evaluate(\'-42\', document, null, XPathResult.NUMBER_TYPE, null).numberValue', '-42.0'); 50 51 var successfullyParsed = true; 52 53 </script> 54 <script src="../../../js/resources/js-test-post.js"></script> 55 </body> 56 </html> 57