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

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

Issue 2773233002: MD Settings: change settings-input to home-url-input due to reduced usage. (Closed)
Patch Set: fixed test that stopped working after code was updated per comments Created 3 years, 8 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
« no previous file with comments | « chrome/browser/resources/settings/settings_resources.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {settings.AppearanceBrowserProxy} 7 * @implements {settings.AppearanceBrowserProxy}
8 * @extends {settings.TestBrowserProxy} 8 * @extends {settings.TestBrowserProxy}
9 */ 9 */
10 var TestAppearanceBrowserProxy = function() { 10 var TestAppearanceBrowserProxy = function() {
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 test('show home button toggling', function() { 245 test('show home button toggling', function() {
246 assertFalse(!!appearancePage.$$('.list-frame')); 246 assertFalse(!!appearancePage.$$('.list-frame'));
247 appearancePage.set('prefs', {browser: {show_home_button: {value: true}}}); 247 appearancePage.set('prefs', {browser: {show_home_button: {value: true}}});
248 248
249 Polymer.dom.flush(); 249 Polymer.dom.flush();
250 250
251 assertTrue(!!appearancePage.$$('.list-frame')); 251 assertTrue(!!appearancePage.$$('.list-frame'));
252 }); 252 });
253 253
254 test('home button urls', function() { 254 test('home button urls', function() {
255 appearancePage.set('prefs', { 255 var input = document.createElement('home-url-input');
256 browser: {show_home_button: {value: true}}, 256 input.set(
257 homepage: {type: chrome.settingsPrivate.PrefType.URL, value: 'test'} 257 'pref', {type: chrome.settingsPrivate.PrefType.URL, value: 'test'});
258 });
259 258
259 document.body.appendChild(input);
dpapad 2017/03/30 20:27:00 This test no longer uses appearancePage. Let's cal
scottchen 2017/03/31 00:01:06 Done.
260 Polymer.dom.flush(); 260 Polymer.dom.flush();
261 261
262 var input = appearancePage.$$('#customHomePage');
263 assertTrue(!!input);
264 assertFalse(input.invalid); 262 assertFalse(input.invalid);
265 assertEquals(input.value, 'test'); 263 assertEquals(input.value, 'test');
266 264
267 input.value = '@@@'; 265 input.value = '@@@';
268 appearanceBrowserProxy.setValidStartupPageResponse(false); 266 appearanceBrowserProxy.setValidStartupPageResponse(false);
269 input.fire('input'); 267 input.$.input.fire('input');
270 268
271 return appearanceBrowserProxy.whenCalled('validateStartupPage') 269 return appearanceBrowserProxy.whenCalled('validateStartupPage')
272 .then(function() { 270 .then(function() {
273 Polymer.dom.flush(); 271 Polymer.dom.flush();
274 assertEquals(input.value, '@@@'); 272 assertEquals(input.value, '@@@');
275 assertTrue(input.invalid); 273 assertTrue(input.invalid);
276 274
277 // Should reset to default value on change event. 275 // Should reset to default value on change event.
278 input.$$('paper-input').fire('change'); 276 input.$.input.fire('change');
279 Polymer.dom.flush(); 277 Polymer.dom.flush();
280 assertEquals(input.value, 'test'); 278 assertEquals(input.value, 'test');
281 }); 279 });
282 }); 280 });
283 }); 281 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/settings_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698