OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <link rel="stylesheet" href="resources/stylesheet.css"> | 3 <link rel="stylesheet" href="resources/stylesheet.css"> |
4 <script> | 4 <script> |
5 function print(message, color) { | 5 function print(message, color) { |
6 var paragraph = document.createElement("div"); | 6 var paragraph = document.createElement("div"); |
7 paragraph.appendChild(document.createTextNode(message)); | 7 paragraph.appendChild(document.createTextNode(message)); |
8 paragraph.style.fontFamily = "monospace"; | 8 paragraph.style.fontFamily = "monospace"; |
9 if (color) | 9 if (color) |
10 paragraph.style.color = color; | 10 paragraph.style.color = color; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 function () { return NodeFilt
er.FILTER_ACCEPT; }, | 73 function () { return NodeFilt
er.FILTER_ACCEPT; }, |
74 false); | 74 false); |
75 } catch(e) { | 75 } catch(e) { |
76 nodeIterator = new Object(); | 76 nodeIterator = new Object(); |
77 } | 77 } |
78 | 78 |
79 nodeFilter = nodeIterator.filter; | 79 nodeFilter = nodeIterator.filter; |
80 shouldBe("nodeFilter.FILTER_ACCEPT", 1); | 80 shouldBe("nodeFilter.FILTER_ACCEPT", 1); |
81 shouldBe("nodeFilter.FILTER_REJECT", 2); | 81 shouldBe("nodeFilter.FILTER_REJECT", 2); |
82 shouldBe("nodeFilter.FILTER_SKIP", 3); | 82 shouldBe("nodeFilter.FILTER_SKIP", 3); |
83 shouldBe("nodeFilter.SHOW_ALL", -1); | 83 shouldBe("nodeFilter.SHOW_ALL", 4294967295); |
84 shouldBe("nodeFilter.SHOW_ELEMENT", 0x00000001); | 84 shouldBe("nodeFilter.SHOW_ELEMENT", 0x00000001); |
85 shouldBe("nodeFilter.SHOW_ATTRIBUTE", 0x00000002); | 85 shouldBe("nodeFilter.SHOW_ATTRIBUTE", 0x00000002); |
86 shouldBe("nodeFilter.SHOW_TEXT", 0x00000004); | 86 shouldBe("nodeFilter.SHOW_TEXT", 0x00000004); |
87 shouldBe("nodeFilter.SHOW_CDATA_SECTION", 0x00000008); | 87 shouldBe("nodeFilter.SHOW_CDATA_SECTION", 0x00000008); |
88 shouldBe("nodeFilter.SHOW_ENTITY_REFERENCE", 0x00000010); | 88 shouldBe("nodeFilter.SHOW_ENTITY_REFERENCE", 0x00000010); |
89 shouldBe("nodeFilter.SHOW_ENTITY", 0x00000020); | 89 shouldBe("nodeFilter.SHOW_ENTITY", 0x00000020); |
90 shouldBe("nodeFilter.SHOW_PROCESSING_INSTRUCTION", 0x00000040); | 90 shouldBe("nodeFilter.SHOW_PROCESSING_INSTRUCTION", 0x00000040); |
91 shouldBe("nodeFilter.SHOW_COMMENT", 0x00000080); | 91 shouldBe("nodeFilter.SHOW_COMMENT", 0x00000080); |
92 shouldBe("nodeFilter.SHOW_DOCUMENT", 0x00000100); | 92 shouldBe("nodeFilter.SHOW_DOCUMENT", 0x00000100); |
93 shouldBe("nodeFilter.SHOW_DOCUMENT_TYPE", 0x00000200); | 93 shouldBe("nodeFilter.SHOW_DOCUMENT_TYPE", 0x00000200); |
94 shouldBe("nodeFilter.SHOW_DOCUMENT_FRAGMENT", 0x00000400); | 94 shouldBe("nodeFilter.SHOW_DOCUMENT_FRAGMENT", 0x00000400); |
95 shouldBe("nodeFilter.SHOW_NOTATION", 0x00000800); | 95 shouldBe("nodeFilter.SHOW_NOTATION", 0x00000800); |
96 | 96 |
97 shouldBe("window.NodeFilter.FILTER_ACCEPT", 1); | 97 shouldBe("window.NodeFilter.FILTER_ACCEPT", 1); |
98 shouldBe("window.NodeFilter.FILTER_REJECT", 2); | 98 shouldBe("window.NodeFilter.FILTER_REJECT", 2); |
99 shouldBe("window.NodeFilter.FILTER_SKIP", 3); | 99 shouldBe("window.NodeFilter.FILTER_SKIP", 3); |
100 shouldBe("window.NodeFilter.SHOW_ALL", -1); | 100 shouldBe("window.NodeFilter.SHOW_ALL", 4294967295); |
101 shouldBe("window.NodeFilter.SHOW_ELEMENT", 0x00000001); | 101 shouldBe("window.NodeFilter.SHOW_ELEMENT", 0x00000001); |
102 shouldBe("window.NodeFilter.SHOW_ATTRIBUTE", 0x00000002); | 102 shouldBe("window.NodeFilter.SHOW_ATTRIBUTE", 0x00000002); |
103 shouldBe("window.NodeFilter.SHOW_TEXT", 0x00000004); | 103 shouldBe("window.NodeFilter.SHOW_TEXT", 0x00000004); |
104 shouldBe("window.NodeFilter.SHOW_CDATA_SECTION", 0x00000008); | 104 shouldBe("window.NodeFilter.SHOW_CDATA_SECTION", 0x00000008); |
105 shouldBe("window.NodeFilter.SHOW_ENTITY_REFERENCE", 0x00000010); | 105 shouldBe("window.NodeFilter.SHOW_ENTITY_REFERENCE", 0x00000010); |
106 shouldBe("window.NodeFilter.SHOW_ENTITY", 0x00000020); | 106 shouldBe("window.NodeFilter.SHOW_ENTITY", 0x00000020); |
107 shouldBe("window.NodeFilter.SHOW_PROCESSING_INSTRUCTION", 0x00000040); | 107 shouldBe("window.NodeFilter.SHOW_PROCESSING_INSTRUCTION", 0x00000040); |
108 shouldBe("window.NodeFilter.SHOW_COMMENT", 0x00000080); | 108 shouldBe("window.NodeFilter.SHOW_COMMENT", 0x00000080); |
109 shouldBe("window.NodeFilter.SHOW_DOCUMENT", 0x00000100); | 109 shouldBe("window.NodeFilter.SHOW_DOCUMENT", 0x00000100); |
110 shouldBe("window.NodeFilter.SHOW_DOCUMENT_TYPE", 0x00000200); | 110 shouldBe("window.NodeFilter.SHOW_DOCUMENT_TYPE", 0x00000200); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 <body onload="test();"> | 159 <body onload="test();"> |
160 <p>This page tests CSSRule, CSSValue, NodeFilter, and Event. It tests:</p> | 160 <p>This page tests CSSRule, CSSValue, NodeFilter, and Event. It tests:</p> |
161 <ol> | 161 <ol> |
162 <li>Whether their global constructors have the correct constant values</li> | 162 <li>Whether their global constructors have the correct constant values</li> |
163 <li>Whether their objects have the correct constant values</li> | 163 <li>Whether their objects have the correct constant values</li> |
164 </ol> | 164 </ol> |
165 <hr> | 165 <hr> |
166 <div id='console'></div> | 166 <div id='console'></div> |
167 </body> | 167 </body> |
168 </html> | 168 </html> |
OLD | NEW |