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

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

Issue 2706013002: Added support for self.origin in Window and WorkerGlobalScope (Closed)
Patch Set: rebase-update after manifest.json changes Created 3 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(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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 if (propertyPath == 'navigator.connection.downlinkMax') 47 if (propertyPath == 'navigator.connection.downlinkMax')
48 return; 48 return;
49 49
50 switch (propertyPath) { 50 switch (propertyPath) {
51 case "location.href": 51 case "location.href":
52 expected = "'about:blank'"; 52 expected = "'about:blank'";
53 break; 53 break;
54 case "location.origin": 54 case "location.origin":
55 expected = "'null'"; 55 expected = "'null'";
56 break; 56 break;
57 case "origin":
58 expected = "'file://'";
59 break;
57 case "location.pathname": 60 case "location.pathname":
58 expected = "'blank'"; 61 expected = "'blank'";
59 break; 62 break;
60 case "location.protocol": 63 case "location.protocol":
61 expected = "'about:'"; 64 expected = "'about:'";
62 break; 65 break;
63 case "location.ancestorOrigins.length": 66 case "location.ancestorOrigins.length":
64 expected = "1"; 67 expected = "1";
65 break; 68 break;
66 case "navigator.appCodeName": 69 case "navigator.appCodeName":
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 128 }
126 129
127 function pathExists(object, path) { 130 function pathExists(object, path) {
128 for (var i = 0; i < path.length; i++) { 131 for (var i = 0; i < path.length; i++) {
129 if (!object || !(path[i] in object)) 132 if (!object || !(path[i] in object))
130 return false; 133 return false;
131 object = object[path[i]]; 134 object = object[path[i]];
132 } 135 }
133 return true; 136 return true;
134 } 137 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698