OLD | NEW |
---|---|
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 Loading... | |
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 }); |
OLD | NEW |