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

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

Issue 212333002: Skip 'eventSender' at collecting properties (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 if (a.property > b.property) 11 if (a.property > b.property)
12 return 1; 12 return 1;
13 return 0; 13 return 0;
14 }); 14 });
15 } 15 }
16 16
17 function emitExpectedResult(path, expected) 17 function emitExpectedResult(path, expected)
18 { 18 {
19 // Skip internals properties, since they aren't web accessible. 19 // Skip internals properties, since they aren't web accessible.
20 if (path[0] == 'internals' 20 if (path[0] == 'internals'
21 || path[0] == 'propertiesToVerify' // Skip the list we're building... 21 || path[0] == 'propertiesToVerify' // Skip the list we're building...
22 || path[0] == 'clientInformation' // Just an alias for navigator. 22 || path[0] == 'clientInformation' // Just an alias for navigator.
23 // Skip testRunner since they are only for testing. 23 // Skip testRunner since they are only for testing.
24 || path[0] == 'testRunner' 24 || path[0] == 'testRunner'
25 || path[0] == 'eventSender' // Skip eventSender since they are only for testing.
25 || path[0] == 'layoutTestController') { // Just an alias for testRunner. 26 || path[0] == 'layoutTestController') { // Just an alias for testRunner.
26 return; 27 return;
27 } 28 }
28 29
29 // FIXME: Skip MemoryInfo for now, since it's not implemented as a DOMWindow Property, and has 30 // FIXME: Skip MemoryInfo for now, since it's not implemented as a DOMWindow Property, and has
30 // no way of knowing when it's detached. Eventually this should have the sam e behavior. 31 // no way of knowing when it's detached. Eventually this should have the sam e behavior.
31 if (path.length >= 2 && (path[0] == 'console' || path[0] == 'performance') & & path[1] == 'memory') 32 if (path.length >= 2 && (path[0] == 'console' || path[0] == 'performance') & & path[1] == 'memory')
32 return; 33 return;
33 34
34 // Skip things that are assumed to be constants. 35 // Skip things that are assumed to be constants.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } else if (type == "string") { 100 } else if (type == "string") {
100 emitExpectedResult(path, "''"); 101 emitExpectedResult(path, "''");
101 } else if (type == "number") { 102 } else if (type == "number") {
102 emitExpectedResult(path, "0"); 103 emitExpectedResult(path, "0");
103 } else if (type == "boolean") { 104 } else if (type == "boolean") {
104 emitExpectedResult(path, "false"); 105 emitExpectedResult(path, "false");
105 } 106 }
106 path.pop(); 107 path.pop();
107 } 108 }
108 } 109 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698