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

Side by Side Diff: chrome/test/data/webui/settings/settings_main_test.js

Issue 2866463002: Revert of MD Settings: Elim SettingsSubpageBrowsertest and SettingsPageVisibility (Closed)
Patch Set: Created 3 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('settings_main_page', function() { 5 cr.define('settings_main_page', function() {
6 /** 6 /**
7 * Extending TestBrowserProxy even though SearchManager is not a browser proxy 7 * Extending TestBrowserProxy even though SearchManager is not a browser proxy
8 * itself. Essentially TestBrowserProxy can act as a "proxy" for any external 8 * itself. Essentially TestBrowserProxy can act as a "proxy" for any external
9 * dependency, not just "browser proxies" (and maybe should be renamed to 9 * dependency, not just "browser proxies" (and maybe should be renamed to
10 * TestProxy). 10 * TestProxy).
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 var settingsMain = null; 64 var settingsMain = null;
65 65
66 setup(function() { 66 setup(function() {
67 settings.navigateTo(settings.Route.BASIC); 67 settings.navigateTo(settings.Route.BASIC);
68 searchManager = new TestSearchManager(); 68 searchManager = new TestSearchManager();
69 settings.setSearchManagerForTesting(searchManager); 69 settings.setSearchManagerForTesting(searchManager);
70 PolymerTest.clearBody(); 70 PolymerTest.clearBody();
71 settingsMain = document.createElement('settings-main'); 71 settingsMain = document.createElement('settings-main');
72 settingsMain.prefs = settingsPrefs.prefs; 72 settingsMain.prefs = settingsPrefs.prefs;
73 settingsMain.toolbarSpinnerActive = false; 73 settingsMain.toolbarSpinnerActive = false;
74 // Set default page visibility.
75 settingsMain.pageVisibility = {};
76 document.body.appendChild(settingsMain); 74 document.body.appendChild(settingsMain);
77 }); 75 });
78 76
79 teardown(function() { settingsMain.remove(); }); 77 teardown(function() { settingsMain.remove(); });
80 78
81 test('searchContents() triggers SearchManager', function() { 79 test('searchContents() triggers SearchManager', function() {
82 Polymer.dom.flush(); 80 Polymer.dom.flush();
83 81
84 var expectedQuery1 = 'foo'; 82 var expectedQuery1 = 'foo';
85 var expectedQuery2 = 'bar'; 83 var expectedQuery2 = 'bar';
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 265
268 assertPageVisibility('', ''); 266 assertPageVisibility('', '');
269 }); 267 });
270 }); 268 });
271 } 269 }
272 270
273 return { 271 return {
274 registerTests: registerTests, 272 registerTests: registerTests,
275 }; 273 };
276 }); 274 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698