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

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

Issue 2847583002: [MD settings] css for row separator (Closed)
Patch Set: browser tests 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 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // The "USE GTK+" button shouldn't be showing if it's already in use. 174 // The "USE GTK+" button shouldn't be showing if it's already in use.
175 assertFalse(!!appearancePage.$$('#useSystem')); 175 assertFalse(!!appearancePage.$$('#useSystem'));
176 176
177 appearanceBrowserProxy.setIsSupervised(true); 177 appearanceBrowserProxy.setIsSupervised(true);
178 appearancePage.set(USE_SYSTEM_PREF, false); 178 appearancePage.set(USE_SYSTEM_PREF, false);
179 Polymer.dom.flush(); 179 Polymer.dom.flush();
180 // Supervised users have their own theme and can't use GTK+ theme. 180 // Supervised users have their own theme and can't use GTK+ theme.
181 assertFalse(!!appearancePage.$$('#useDefault')); 181 assertFalse(!!appearancePage.$$('#useDefault'));
182 assertFalse(!!appearancePage.$$('#useSystem')); 182 assertFalse(!!appearancePage.$$('#useSystem'));
183 // If there's no "USE" buttons, the container should be hidden. 183 // If there's no "USE" buttons, the container should be hidden.
184 assertTrue(appearancePage.$$('.secondary-action').hidden); 184 assertTrue(appearancePage.$$('#themesSecondarActions').hidden);
Dan Beam 2017/05/01 15:32:31 at least you're consistent...
dschuyler 2017/05/01 19:26:11 Done.
185 185
186 appearanceBrowserProxy.setIsSupervised(false); 186 appearanceBrowserProxy.setIsSupervised(false);
187 appearancePage.set(THEME_ID_PREF, 'fake theme id'); 187 appearancePage.set(THEME_ID_PREF, 'fake theme id');
188 Polymer.dom.flush(); 188 Polymer.dom.flush();
189 // If there's "USE" buttons again, the container should be visible. 189 // If there's "USE" buttons again, the container should be visible.
190 assertTrue(!!appearancePage.$$('#useDefault')); 190 assertTrue(!!appearancePage.$$('#useDefault'));
191 assertFalse(appearancePage.$$('.secondary-action').hidden); 191 assertFalse(appearancePage.$$('#themesSecondarActions').hidden);
192 192
193 var button = appearancePage.$$('#useSystem'); 193 var button = appearancePage.$$('#useSystem');
194 assertTrue(!!button); 194 assertTrue(!!button);
195 195
196 MockInteractions.tap(button); 196 MockInteractions.tap(button);
197 return appearanceBrowserProxy.whenCalled('useSystemTheme'); 197 return appearanceBrowserProxy.whenCalled('useSystemTheme');
198 }); 198 });
199 } else { 199 } else {
200 test('useDefaultTheme', function() { 200 test('useDefaultTheme', function() {
201 assertFalse(!!appearancePage.get(THEME_ID_PREF)); 201 assertFalse(!!appearancePage.get(THEME_ID_PREF));
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 assertEquals(homeUrlInput.value, '@@@'); // Value hasn't changed. 283 assertEquals(homeUrlInput.value, '@@@'); // Value hasn't changed.
284 assertTrue(homeUrlInput.invalid); 284 assertTrue(homeUrlInput.invalid);
285 285
286 // Should reset to default value on change event. 286 // Should reset to default value on change event.
287 homeUrlInput.$.input.fire('change'); 287 homeUrlInput.$.input.fire('change');
288 Polymer.dom.flush(); 288 Polymer.dom.flush();
289 assertEquals(homeUrlInput.value, 'test'); 289 assertEquals(homeUrlInput.value, 'test');
290 }); 290 });
291 }); 291 });
292 }); 292 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698