| 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 28 matching lines...) Expand all Loading... |
| 39 return; | 39 return; |
| 40 | 40 |
| 41 // Various special cases for legacy reasons. Please do not add entries to th
is list. | 41 // Various special cases for legacy reasons. Please do not add entries to th
is list. |
| 42 var propertyPath = path.join('.'); | 42 var propertyPath = path.join('.'); |
| 43 | 43 |
| 44 // Connection type depends on the host, skip. | 44 // Connection type depends on the host, skip. |
| 45 if (propertyPath == 'navigator.connection.type') | 45 if (propertyPath == 'navigator.connection.type') |
| 46 return; | 46 return; |
| 47 if (propertyPath == 'navigator.connection.downlinkMax') | 47 if (propertyPath == 'navigator.connection.downlinkMax') |
| 48 return; | 48 return; |
| 49 if (propertyPath == 'navigator.connection.rtt') |
| 50 return; |
| 51 if (propertyPath == 'navigator.connection.downlink') |
| 52 return; |
| 49 | 53 |
| 50 switch (propertyPath) { | 54 switch (propertyPath) { |
| 51 case "location.href": | 55 case "location.href": |
| 52 expected = "'about:blank'"; | 56 expected = "'about:blank'"; |
| 53 break; | 57 break; |
| 54 case "location.origin": | 58 case "location.origin": |
| 55 expected = "'null'"; | 59 expected = "'null'"; |
| 56 break; | 60 break; |
| 57 case "origin": | 61 case "origin": |
| 58 expected = "'file://'"; | 62 expected = "'file://'"; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } | 132 } |
| 129 | 133 |
| 130 function pathExists(object, path) { | 134 function pathExists(object, path) { |
| 131 for (var i = 0; i < path.length; i++) { | 135 for (var i = 0; i < path.length; i++) { |
| 132 if (!object || !(path[i] in object)) | 136 if (!object || !(path[i] in object)) |
| 133 return false; | 137 return false; |
| 134 object = object[path[i]]; | 138 object = object[path[i]]; |
| 135 } | 139 } |
| 136 return true; | 140 return true; |
| 137 } | 141 } |
| OLD | NEW |