Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / xpath / string-value.html
blobaa0828e2e2634f109647393f0ef95387c2b7d1c7
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <div id="console"></div>
9 <script>
10 doc = (new DOMParser).parseFromString(
11 '<?xml version="1.0" encoding="ISO-8859-1"?>' +
12 '<!DOCTYPE doc []>' +
13 '<?xml-stylesheet "Data" ?>' +
14 '<!' + '-- comment -->' +
15 '<doc attr="&lt;&amp;nbsp;>">0 <elem>1</elem><!' + '-- comment -->a<![CDATA[-cdata-]]>b<elem>2</elem><empty></empty></doc>',
16 'application/xml');
18 PI = doc.firstChild;
19 while (PI.nodeType != Node.PROCESSING_INSTRUCTION_NODE)
20 PI = PI.nextSibling;
22 COMMENT = doc.firstChild;
23 while (COMMENT.nodeType != Node.COMMENT_NODE)
24 COMMENT = COMMENT.nextSibling;
26 ATTR = doc.documentElement.getAttributeNode("attr");
28 CDATA = doc.documentElement.firstChild;
29 while (CDATA.nodeType != Node.CDATA_SECTION_NODE)
30 CDATA = CDATA.nextSibling;
32 TEXT = doc.documentElement.firstChild;
34 EMPTY = doc.documentElement.lastChild;
36 shouldBe("doc.evaluate('.', doc, null, XPathResult.STRING_TYPE, null).stringValue", "'0 1a-cdata-b2'");
37 shouldBe("doc.evaluate('.', doc.documentElement, null, XPathResult.STRING_TYPE, null).stringValue", "'0 1a-cdata-b2'");
38 shouldBe("doc.evaluate('.', PI, null, XPathResult.STRING_TYPE, null).stringValue", "'\"Data\" '");
39 shouldBe("doc.evaluate('.', COMMENT, null, XPathResult.STRING_TYPE, null).stringValue", "' comment '");
40 shouldBe("doc.evaluate('.', CDATA, null, XPathResult.STRING_TYPE, null).stringValue", "'-cdata-'");
41 shouldBe("doc.evaluate('.', TEXT, null, XPathResult.STRING_TYPE, null).stringValue", "'0 '");
42 shouldBe("doc.evaluate('.', EMPTY, null, XPathResult.STRING_TYPE, null).stringValue", "''");
43 shouldBe("doc.evaluate('.', ATTR, null, XPathResult.STRING_TYPE, null).stringValue", "'<&nbsp;>'");
45 </script>
46 </body>
47 </html>