OLD | NEW |
1 function collectProperties(object, windowHasBeenGCed) | 1 function collectProperties(object, windowHasBeenGCed) |
2 { | 2 { |
3 collectPropertiesHelper(object, object, windowHasBeenGCed, []); | 3 collectPropertiesHelper(object, object, windowHasBeenGCed, []); |
4 | 4 |
5 propertiesToVerify.sort(function (a, b) | 5 propertiesToVerify.sort(function (a, b) |
6 { | 6 { |
7 if (a.property < b.property) | 7 if (a.property < b.property) |
8 return -1 | 8 return -1 |
9 if (a.property > b.property) | 9 if (a.property > b.property) |
10 return 1; | 10 return 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 return; | 42 return; |
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 if (propertyPath == 'navigator.connection.rtt') |
| 53 return; |
| 54 if (propertyPath == 'navigator.connection.downlink') |
| 55 return; |
52 | 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 "origin": | 64 case "origin": |
61 expected = "'file://'"; | 65 expected = "'file://'"; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 } | 135 } |
132 | 136 |
133 function pathExists(object, path) { | 137 function pathExists(object, path) { |
134 for (var i = 0; i < path.length; i++) { | 138 for (var i = 0; i < path.length; i++) { |
135 if (!object || !(path[i] in object)) | 139 if (!object || !(path[i] in object)) |
136 return false; | 140 return false; |
137 object = object[path[i]]; | 141 object = object[path[i]]; |
138 } | 142 } |
139 return true; | 143 return true; |
140 } | 144 } |
OLD | NEW |