Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Side by Side Diff: LayoutTests/fast/dom/HTMLDocument/object-by-name-or-id.html

Issue 61213008: Revert "Finding an <object> element by name only works it has no children other than <param> elemen… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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. A PASS result means that behavior matches IE and Firefox. 4 document object. IE allows this only if the object has not child nodes other tha n param and
5 whitespace anonymous text. A PASS result means that behavior matches IE. WebKit& rsquo;s results for comments differ.
5 </p> 6 </p>
6 7
7 <hr> 8 <hr>
8 9
9 <script> 10 <script>
10 if (window.testRunner) 11 if (window.testRunner)
11 window.testRunner.dumpAsText(); 12 window.testRunner.dumpAsText();
12 </script> 13 </script>
13 14
14 <div style="visibility: hidden; width: 0px; height: 0px;"> 15 <div style="visibility: hidden; width: 0px; height: 0px;">
(...skipping 29 matching lines...) Expand all
44 var propVal = document[propName]; 45 var propVal = document[propName];
45 46
46 print(!propVal == IE ? " FAIL" : " PASS"); 47 print(!propVal == IE ? " FAIL" : " PASS");
47 print("<br>"); 48 print("<br>");
48 } 49 }
49 50
50 print("By name:<br>"); 51 print("By name:<br>");
51 testProperty("no children", "object1", true); 52 testProperty("no children", "object1", true);
52 testProperty("param", "object2", true); 53 testProperty("param", "object2", true);
53 testProperty("param and whitespace", "object5", true); 54 testProperty("param and whitespace", "object5", true);
54 testProperty("param and empty comment", "object9", true); 55 testProperty("param and empty comment", "object9", false);
55 testProperty("param and non-empty comment", "object11", true); 56 testProperty("param and non-empty comment", "object11", false);
56 testProperty("param and text", "object6", true); 57 testProperty("param and text", "object6", false);
57 testProperty("param and img", "object13", true); 58 testProperty("param and img", "object13", false);
58 print("<br>By id:<br>"); 59 print("<br>By id:<br>");
59 testProperty("no children", "object3", true); 60 testProperty("no children", "object3", true);
60 testProperty("param", "object4", true); 61 testProperty("param", "object4", true);
61 testProperty("param and whitespace", "object8", true); 62 testProperty("param and whitespace", "object8", true);
62 testProperty("param and empty comment", "object10", true); 63 testProperty("param and empty comment", "object10", false);
63 testProperty("param and non-empty comment", "object12", true); 64 testProperty("param and non-empty comment", "object12", false);
64 testProperty("param and text", "object7", true); 65 testProperty("param and text", "object7", false);
65 testProperty("param and img", "object14", true); 66 testProperty("param and img", "object14", false);
66 67
67 </script> 68 </script>
68 </body> 69 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698