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

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

Issue 2195793003: MD Settings: add test for managed actionability of people section (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@people-sync-disabled-actionable
Patch Set: Created 4 years, 4 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/people_page/people_page.html ('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 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_people_page', function() { 5 cr.define('settings_people_page', function() {
6 /** 6 /**
7 * @constructor 7 * @constructor
8 * @implements {settings.ProfileInfoBrowserProxy} 8 * @implements {settings.ProfileInfoBrowserProxy}
9 * @extends {settings.TestBrowserProxy} 9 * @extends {settings.TestBrowserProxy}
10 */ 10 */
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 assertTrue(!!activityControls); 207 assertTrue(!!activityControls);
208 assertFalse(activityControls.hidden); 208 assertFalse(activityControls.hidden);
209 209
210 cr.webUIListenerCallback('sync-status-changed', { 210 cr.webUIListenerCallback('sync-status-changed', {
211 signedIn: false, 211 signedIn: false,
212 }); 212 });
213 213
214 assertTrue(activityControls.hidden); 214 assertTrue(activityControls.hidden);
215 }); 215 });
216 }); 216 });
217
218 test('ManagedSyncDisabled', function() {
tommycli 2016/07/29 19:25:22 Name instead: CustomizeSync ? Or CustomizeSyncDisa
Dan Beam 2016/07/29 19:27:41 Done.
219 assertFalse(!!peoplePage.$$('#customize-sync'));
220
221 return browserProxy.whenCalled('getSyncStatus').then(function() {
222 cr.webUIListenerCallback('sync-status-changed', {
223 signedIn: true,
224 syncSystemEnabled: true,
225 });
226 Polymer.dom.flush();
227
228 var customizeSync = peoplePage.$$('#customize-sync');
229 assertTrue(!!customizeSync);
230 assertTrue(customizeSync.hasAttribute('actionable'));
231 }).then(function() {
232 cr.webUIListenerCallback('sync-status-changed', {
233 managed: true,
234 signedIn: true,
235 syncSystemEnabled: true,
236 });
237 Polymer.dom.flush();
238
239 var customizeSync = peoplePage.$$('#customize-sync');
240 assertTrue(!!customizeSync);
241 assertFalse(customizeSync.hasAttribute('actionable'));
242 });
243 });
217 }); 244 });
218 } 245 }
219 246
220 return { 247 return {
221 registerTests: function() { 248 registerTests: function() {
222 registerProfileInfoTests(); 249 registerProfileInfoTests();
223 if (!cr.isChromeOS) 250 if (!cr.isChromeOS)
224 registerSyncStatusTests(); 251 registerSyncStatusTests();
225 }, 252 },
226 }; 253 };
227 }); 254 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/people_page/people_page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698