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

Side by Side Diff: LayoutTests/fast/dom/Window/resources/window-property-collector.js

Issue 208243016: Fix collected properties in window-property-collector.js (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove mac-specific results Created 6 years, 9 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 function collectProperties() 1 function collectProperties()
2 { 2 {
3 // Collect properties of the top-level window, since touching the properties 3 // Collect properties of the top-level window, since touching the properties
4 // of a DOMWindow affects its internal C++ state. 4 // of a DOMWindow affects its internal C++ state.
5 collectPropertiesHelper(window, []); 5 collectPropertiesHelper(window, []);
6 6
7 propertiesToVerify.sort(function (a, b) 7 propertiesToVerify.sort(function (a, b)
8 { 8 {
9 if (a.property < b.property) 9 if (a.property < b.property)
10 return -1 10 return -1
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Skip the properties which are hard to expect a stable result. 78 // Skip the properties which are hard to expect a stable result.
79 // As for 'accessibilityController', we can hardly estimate the states 79 // As for 'accessibilityController', we can hardly estimate the states
80 // of the cached WebAXObjects. 80 // of the cached WebAXObjects.
81 // FIXME: We can't access accessibilityController's properties here 81 // FIXME: We can't access accessibilityController's properties here
82 // because some property accesses might crash (crbug/351195). 82 // because some property accesses might crash (crbug/351195).
83 if (property == 'accessibilityController') 83 if (property == 'accessibilityController')
84 continue; 84 continue;
85 // As for 'localStorage', local storage is not reliably cleared between tests. 85 // As for 'localStorage', local storage is not reliably cleared between tests.
86 if (property == 'localStorage') 86 if (property == 'localStorage')
87 continue; 87 continue;
88 if (!object[property])
89 continue;
90 path.push(property); 88 path.push(property);
91 var type = typeof(object[property]); 89 var type = typeof(object[property]);
92 if (type == "object") { 90 if (type == "object") {
93 // Skip some traversing through types that will end up in cycles... 91 if (object[property] === null) {
94 if (!object[property].Window 92 emitExpectedResult(path, "null");
93 } else if (!object[property].Window
95 && !(object[property] instanceof Node) 94 && !(object[property] instanceof Node)
96 && !(object[property] instanceof MimeTypeArray) 95 && !(object[property] instanceof MimeTypeArray)
97 && !(object[property] instanceof PluginArray)) { 96 && !(object[property] instanceof PluginArray)) {
97 // Skip some traversing through types that will end up in cycles ...
98 collectPropertiesHelper(object[property], path); 98 collectPropertiesHelper(object[property], path);
99 } 99 }
100 } else if (type == "string") { 100 } else if (type == "string") {
101 emitExpectedResult(path, "''"); 101 emitExpectedResult(path, "''");
102 } else if (type == "number") { 102 } else if (type == "number") {
103 emitExpectedResult(path, "0"); 103 emitExpectedResult(path, "0");
104 } else if (type == "boolean") { 104 } else if (type == "boolean") {
105 emitExpectedResult(path, "false"); 105 emitExpectedResult(path, "false");
106 } 106 }
107 path.pop(); 107 path.pop();
108 } 108 }
109 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698