| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 shouldBe("cssRule.FONT_FACE_RULE", 5); | 46 shouldBe("cssRule.FONT_FACE_RULE", 5); |
| 47 shouldBe("cssRule.PAGE_RULE", 6); | 47 shouldBe("cssRule.PAGE_RULE", 6); |
| 48 | 48 |
| 49 shouldBe("window.CSSRule.STYLE_RULE", 1); | 49 shouldBe("window.CSSRule.STYLE_RULE", 1); |
| 50 shouldBe("window.CSSRule.CHARSET_RULE", 2); | 50 shouldBe("window.CSSRule.CHARSET_RULE", 2); |
| 51 shouldBe("window.CSSRule.IMPORT_RULE", 3); | 51 shouldBe("window.CSSRule.IMPORT_RULE", 3); |
| 52 shouldBe("window.CSSRule.MEDIA_RULE", 4); | 52 shouldBe("window.CSSRule.MEDIA_RULE", 4); |
| 53 shouldBe("window.CSSRule.FONT_FACE_RULE", 5); | 53 shouldBe("window.CSSRule.FONT_FACE_RULE", 5); |
| 54 shouldBe("window.CSSRule.PAGE_RULE", 6); | 54 shouldBe("window.CSSRule.PAGE_RULE", 6); |
| 55 | 55 |
| 56 var nodeIterator; | |
| 57 try { | |
| 58 nodeIterator = document.createNodeIterator(document, | |
| 59 NodeFilter.SHOW_ELEMENT, | |
| 60 function () { return NodeFilt
er.FILTER_ACCEPT; }, | |
| 61 false); | |
| 62 } catch(e) { | |
| 63 nodeIterator = new Object(); | |
| 64 } | |
| 65 | |
| 66 nodeFilter = nodeIterator.filter; | |
| 67 shouldBe("nodeFilter.FILTER_ACCEPT", 1); | |
| 68 shouldBe("nodeFilter.FILTER_REJECT", 2); | |
| 69 shouldBe("nodeFilter.FILTER_SKIP", 3); | |
| 70 shouldBe("nodeFilter.SHOW_ALL", 4294967295); | |
| 71 shouldBe("nodeFilter.SHOW_ELEMENT", 0x00000001); | |
| 72 shouldBe("nodeFilter.SHOW_ATTRIBUTE", 0x00000002); | |
| 73 shouldBe("nodeFilter.SHOW_TEXT", 0x00000004); | |
| 74 shouldBe("nodeFilter.SHOW_CDATA_SECTION", 0x00000008); | |
| 75 shouldBe("nodeFilter.SHOW_ENTITY_REFERENCE", 0x00000010); | |
| 76 shouldBe("nodeFilter.SHOW_ENTITY", 0x00000020); | |
| 77 shouldBe("nodeFilter.SHOW_PROCESSING_INSTRUCTION", 0x00000040); | |
| 78 shouldBe("nodeFilter.SHOW_COMMENT", 0x00000080); | |
| 79 shouldBe("nodeFilter.SHOW_DOCUMENT", 0x00000100); | |
| 80 shouldBe("nodeFilter.SHOW_DOCUMENT_TYPE", 0x00000200); | |
| 81 shouldBe("nodeFilter.SHOW_DOCUMENT_FRAGMENT", 0x00000400); | |
| 82 shouldBe("nodeFilter.SHOW_NOTATION", 0x00000800); | |
| 83 | |
| 84 shouldBe("window.NodeFilter.FILTER_ACCEPT", 1); | 56 shouldBe("window.NodeFilter.FILTER_ACCEPT", 1); |
| 85 shouldBe("window.NodeFilter.FILTER_REJECT", 2); | 57 shouldBe("window.NodeFilter.FILTER_REJECT", 2); |
| 86 shouldBe("window.NodeFilter.FILTER_SKIP", 3); | 58 shouldBe("window.NodeFilter.FILTER_SKIP", 3); |
| 87 shouldBe("window.NodeFilter.SHOW_ALL", 4294967295); | 59 shouldBe("window.NodeFilter.SHOW_ALL", 4294967295); |
| 88 shouldBe("window.NodeFilter.SHOW_ELEMENT", 0x00000001); | 60 shouldBe("window.NodeFilter.SHOW_ELEMENT", 0x00000001); |
| 89 shouldBe("window.NodeFilter.SHOW_ATTRIBUTE", 0x00000002); | 61 shouldBe("window.NodeFilter.SHOW_ATTRIBUTE", 0x00000002); |
| 90 shouldBe("window.NodeFilter.SHOW_TEXT", 0x00000004); | 62 shouldBe("window.NodeFilter.SHOW_TEXT", 0x00000004); |
| 91 shouldBe("window.NodeFilter.SHOW_CDATA_SECTION", 0x00000008); | 63 shouldBe("window.NodeFilter.SHOW_CDATA_SECTION", 0x00000008); |
| 92 shouldBe("window.NodeFilter.SHOW_ENTITY_REFERENCE", 0x00000010); | 64 shouldBe("window.NodeFilter.SHOW_ENTITY_REFERENCE", 0x00000010); |
| 93 shouldBe("window.NodeFilter.SHOW_ENTITY", 0x00000020); | 65 shouldBe("window.NodeFilter.SHOW_ENTITY", 0x00000020); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 108 shouldBe("window.Event.CAPTURING_PHASE", 1); | 80 shouldBe("window.Event.CAPTURING_PHASE", 1); |
| 109 shouldBe("window.Event.AT_TARGET", 2); | 81 shouldBe("window.Event.AT_TARGET", 2); |
| 110 shouldBe("window.Event.BUBBLING_PHASE", 3); | 82 shouldBe("window.Event.BUBBLING_PHASE", 3); |
| 111 } | 83 } |
| 112 </script> | 84 </script> |
| 113 </head> | 85 </head> |
| 114 <body onload="test();"> | 86 <body onload="test();"> |
| 115 <p>This page tests CSSRule, NodeFilter, and Event. It tests:</p> | 87 <p>This page tests CSSRule, NodeFilter, and Event. It tests:</p> |
| 116 <ol> | 88 <ol> |
| 117 <li>Whether their global constructors have the correct constant values</li> | 89 <li>Whether their global constructors have the correct constant values</li> |
| 118 <li>Whether their objects have the correct constant values</li> | 90 <li>Whether their objects have the correct constant values, except NodeFilte
r</li> |
| 119 </ol> | 91 </ol> |
| 120 <hr> | 92 <hr> |
| 121 <div id='console'></div> | 93 <div id='console'></div> |
| 122 </body> | 94 </body> |
| 123 </html> | 95 </html> |
| OLD | NEW |