OLD | NEW |
1 <body> | 1 <body> |
2 | 2 |
3 <p>This tests when object elements are accessible by name or id directly as prop
erties of the | 3 <p>This tests when object elements are accessible by name or id directly as prop
erties of the |
4 document object. IE allows this only if the object has not child nodes other tha
n param and | 4 document object. A PASS result means that behavior matches IE and Firefox. |
5 whitespace anonymous text. A PASS result means that behavior matches IE. WebKit&
rsquo;s results for comments differ. | |
6 </p> | 5 </p> |
7 | 6 |
8 <hr> | 7 <hr> |
9 | 8 |
10 <script> | 9 <script> |
11 if (window.testRunner) | 10 if (window.testRunner) |
12 window.testRunner.dumpAsText(); | 11 window.testRunner.dumpAsText(); |
13 </script> | 12 </script> |
14 | 13 |
15 <div style="visibility: hidden; width: 0px; height: 0px;"> | 14 <div style="visibility: hidden; width: 0px; height: 0px;"> |
(...skipping 29 matching lines...) Expand all Loading... |
45 var propVal = document[propName]; | 44 var propVal = document[propName]; |
46 | 45 |
47 print(!propVal == IE ? " FAIL" : " PASS"); | 46 print(!propVal == IE ? " FAIL" : " PASS"); |
48 print("<br>"); | 47 print("<br>"); |
49 } | 48 } |
50 | 49 |
51 print("By name:<br>"); | 50 print("By name:<br>"); |
52 testProperty("no children", "object1", true); | 51 testProperty("no children", "object1", true); |
53 testProperty("param", "object2", true); | 52 testProperty("param", "object2", true); |
54 testProperty("param and whitespace", "object5", true); | 53 testProperty("param and whitespace", "object5", true); |
55 testProperty("param and empty comment", "object9", false); | 54 testProperty("param and empty comment", "object9", true); |
56 testProperty("param and non-empty comment", "object11", false); | 55 testProperty("param and non-empty comment", "object11", true); |
57 testProperty("param and text", "object6", false); | 56 testProperty("param and text", "object6", true); |
58 testProperty("param and img", "object13", false); | 57 testProperty("param and img", "object13", true); |
59 print("<br>By id:<br>"); | 58 print("<br>By id:<br>"); |
60 testProperty("no children", "object3", true); | 59 testProperty("no children", "object3", true); |
61 testProperty("param", "object4", true); | 60 testProperty("param", "object4", true); |
62 testProperty("param and whitespace", "object8", true); | 61 testProperty("param and whitespace", "object8", true); |
63 testProperty("param and empty comment", "object10", false); | 62 testProperty("param and empty comment", "object10", true); |
64 testProperty("param and non-empty comment", "object12", false); | 63 testProperty("param and non-empty comment", "object12", true); |
65 testProperty("param and text", "object7", false); | 64 testProperty("param and text", "object7", true); |
66 testProperty("param and img", "object14", false); | 65 testProperty("param and img", "object14", true); |
67 | 66 |
68 </script> | 67 </script> |
69 </body> | 68 </body> |
OLD | NEW |