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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/plugin-attributes-enumeration.html

Issue 1371793003: Improve plugin-attributes-enumeration test and rebaseline it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months 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 <html> 1 <html>
2 <head> 2 <head>
3 <style> 3 <style>
4 .invisible { 4 .invisible {
5 width: 0; 5 width: 0;
6 height: 0; 6 height: 0;
7 } 7 }
8 </style> 8 </style>
9 9
10 <script> 10 <script>
(...skipping 13 matching lines...) Expand all
24 testRunner.dumpAsText(); 24 testRunner.dumpAsText();
25 25
26 Array.prototype.forEach = function(f) { 26 Array.prototype.forEach = function(f) {
27 for (var i = 0; i < this.length; i++) // > 27 for (var i = 0; i < this.length; i++) // >
28 f(this[i]); 28 f(this[i]);
29 }; 29 };
30 30
31 var objectHash = new Object(); 31 var objectHash = new Object();
32 var embedHash = new Object(); 32 var embedHash = new Object();
33 var intersectionHash = new Object(); 33 var intersectionHash = new Object();
34 var divElement = document.createElement('div');
34 35
35 var object, embed; 36 var object, embed;
36 37
37 object = document.getElementById("object"); 38 object = document.getElementById("object");
38 embed = document.getElementById("embed"); 39 embed = document.getElementById("embed");
39 40
40 for (var p in object) 41 for (var p in object)
41 if (typeof object[p] != 'function') 42 if (typeof object[p] != 'function')
42 objectHash[p] = 1; 43 objectHash[p] = 1;
43 44
44 for (var p in embed) 45 for (var p in embed)
45 if (typeof embed[p] != 'function') 46 if (typeof embed[p] != 'function')
46 embedHash[p] = 1; 47 embedHash[p] = 1;
47 48
48 for (var p in objectHash) 49 for (var p in objectHash)
49 if (embedHash[p]) // ; 50 if (embedHash[p]) // ;
50 intersectionHash[p] = 1; 51 intersectionHash[p] = 1;
51 52
52 print("[OBJECT, EMBED] share:", "green"); 53 print("[OBJECT, EMBED] share:", "green");
53 var array = new Array(); 54 var array = new Array();
54 for (var p in intersectionHash) 55 for (var p in intersectionHash)
55 if (typeof document.body[p] == 'undefined') // weed out items shared by all elements 56 if (typeof divElement[p] == 'undefined') // weed out items shared by all elements
56 array.push(p); 57 array.push(p);
57 array.sort(); 58 array.sort();
58 array.forEach(print); 59 array.forEach(print);
59 60
60 print("----------"); 61 print("----------");
61 print(object.tagName + " also has:", "green"); 62 print(object.tagName + " also has:", "green");
62 var array = new Array(); 63 var array = new Array();
63 for (var p in objectHash) 64 for (var p in objectHash)
64 if (!intersectionHash[p]) 65 if (!intersectionHash[p])
65 array.push(p); 66 array.push(p);
(...skipping 10 matching lines...) Expand all
76 array.forEach(print); 77 array.forEach(print);
77 } 78 }
78 </script> 79 </script>
79 </head> 80 </head>
80 81
81 <body onload="test();"> 82 <body onload="test();">
82 83
83 <hr> 84 <hr>
84 <div id='console'></div> 85 <div id='console'></div>
85 86
86 <object class="invisible" id="object"></object> 87 <div><object class="invisible" id="object"></object></div>
87 <embed class="invisible" id="embed"></embed> 88 <div><embed class="invisible" id="embed"></embed></div>
88 89
89 </body> 90 </body>
90 </html> 91 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698