OLD | NEW |
1 function collectProperties(windowHasBeenGCed) | 1 function collectProperties(windowHasBeenGCed) |
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, windowHasBeenGCed, []); | 5 collectPropertiesHelper(window, windowHasBeenGCed, []); |
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // Various special cases for legacy reasons. Please do not add entries to th
is list. | 44 // Various special cases for legacy reasons. Please do not add entries to th
is list. |
45 var propertyPath = path.join('.'); | 45 var propertyPath = path.join('.'); |
46 | 46 |
47 // Connection type depends on the host, skip. | 47 // Connection type depends on the host, skip. |
48 if (propertyPath == 'navigator.connection.type') | 48 if (propertyPath == 'navigator.connection.type') |
49 return; | 49 return; |
50 if (propertyPath == 'navigator.connection.downlinkMax') | 50 if (propertyPath == 'navigator.connection.downlinkMax') |
51 return; | 51 return; |
52 | 52 |
| 53 // Skip some lightSensor proeperties. |
| 54 if (propertyPath == 'navigator.lightSensor.reading.illuminance' || propertyP
ath == 'navigator.lightSensor.state') |
| 55 return; |
| 56 |
53 switch (propertyPath) { | 57 switch (propertyPath) { |
54 case "location.href": | 58 case "location.href": |
55 expected = "'about:blank'"; | 59 expected = "'about:blank'"; |
56 break; | 60 break; |
57 case "location.origin": | 61 case "location.origin": |
58 expected = "'null'"; | 62 expected = "'null'"; |
59 break; | 63 break; |
60 case "location.pathname": | 64 case "location.pathname": |
61 expected = "'blank'"; | 65 expected = "'blank'"; |
62 break; | 66 break; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 emitExpectedResult(path, "0"); | 116 emitExpectedResult(path, "0"); |
113 } else if (type == "boolean") { | 117 } else if (type == "boolean") { |
114 expected = "false"; | 118 expected = "false"; |
115 if (path == "closed" && windowHasBeenGCed ) | 119 if (path == "closed" && windowHasBeenGCed ) |
116 expected = "true"; | 120 expected = "true"; |
117 emitExpectedResult(path, expected); | 121 emitExpectedResult(path, expected); |
118 } | 122 } |
119 path.pop(); | 123 path.pop(); |
120 } | 124 } |
121 } | 125 } |
OLD | NEW |