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

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

Issue 927213004: Accept options in history APIs to allow scroll restoration to be disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 7 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(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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 case "navigator.onLine": 68 case "navigator.onLine":
69 case "navigator.platform": 69 case "navigator.platform":
70 case "navigator.product": 70 case "navigator.product":
71 case "navigator.productSub": 71 case "navigator.productSub":
72 case "navigator.vendor": 72 case "navigator.vendor":
73 expected = "window." + propertyPath; 73 expected = "window." + propertyPath;
74 break; 74 break;
75 case "screen.orientation": 75 case "screen.orientation":
76 expected = "'portrait-primary'"; 76 expected = "'portrait-primary'";
77 break; 77 break;
78 case "history.options.scrollRestoration":
79 expected = "'auto'";
80 break;
78 } 81 }
79 82
80 insertExpectedResult(path, expected); 83 insertExpectedResult(path, expected);
81 } 84 }
82 85
83 function collectPropertiesHelper(object, windowHasBeenGCed, path) 86 function collectPropertiesHelper(object, windowHasBeenGCed, path)
84 { 87 {
85 if (path.length > 20) 88 if (path.length > 20)
86 throw 'Error: probably looping'; 89 throw 'Error: probably looping';
87 90
(...skipping 19 matching lines...) Expand all
107 emitExpectedResult(path, "0"); 110 emitExpectedResult(path, "0");
108 } else if (type == "boolean") { 111 } else if (type == "boolean") {
109 expected = "false"; 112 expected = "false";
110 if (path == "closed" && windowHasBeenGCed ) 113 if (path == "closed" && windowHasBeenGCed )
111 expected = "true"; 114 expected = "true";
112 emitExpectedResult(path, expected); 115 emitExpectedResult(path, expected);
113 } 116 }
114 path.pop(); 117 path.pop();
115 } 118 }
116 } 119 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698