| 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_sync_page', function() { | 5 cr.define('settings_people_page_sync_page', function() { |
| 6 /** | 6 /** |
| 7 * @constructor | 7 * @constructor |
| 8 * @implements {settings.SyncBrowserProxy} | 8 * @implements {settings.SyncBrowserProxy} |
| 9 * @extends {settings.TestBrowserProxy} | 9 * @extends {settings.TestBrowserProxy} |
| 10 */ | 10 */ |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 function(prefs) { | 233 function(prefs) { |
| 234 var expected = getSyncAllPrefs(); | 234 var expected = getSyncAllPrefs(); |
| 235 expected.syncAllDataTypes = false; | 235 expected.syncAllDataTypes = false; |
| 236 expected.extensionsSynced = false; | 236 expected.extensionsSynced = false; |
| 237 assertEquals(JSON.stringify(expected), JSON.stringify(prefs)); | 237 assertEquals(JSON.stringify(expected), JSON.stringify(prefs)); |
| 238 }); | 238 }); |
| 239 } | 239 } |
| 240 return browserProxy.whenCalled('setSyncDatatypes').then(verifyPrefs); | 240 return browserProxy.whenCalled('setSyncDatatypes').then(verifyPrefs); |
| 241 }); | 241 }); |
| 242 | 242 |
| 243 test('ClickingLinkDoesNotChangeCheckboxValue', function() { |
| 244 var syncAllDataTypesCheckbox = syncPage.$.syncAllDataTypesCheckbox; |
| 245 |
| 246 // Uncheck the Sync All checkbox. |
| 247 MockInteractions.tap(syncAllDataTypesCheckbox); |
| 248 |
| 249 // Make sure the checkbox is enabled and checked. |
| 250 var link = syncPage.$.paymentLearnMore; |
| 251 assertEquals('PAPER-CHECKBOX', link.parentNode.nodeName); |
| 252 assertFalse(link.parentNode.disabled); |
| 253 assertTrue(link.parentNode.checked); |
| 254 |
| 255 MockInteractions.tap(link); |
| 256 |
| 257 // The checkbox value should be unchanged after clicking on the link. |
| 258 assertTrue(link.parentNode.checked); |
| 259 }); |
| 260 |
| 243 test('RadioBoxesEnabledWhenUnencrypted', function() { | 261 test('RadioBoxesEnabledWhenUnencrypted', function() { |
| 244 // Verify that the encryption radio boxes are enabled. | 262 // Verify that the encryption radio boxes are enabled. |
| 245 assertFalse(encryptWithGoogle.disabled); | 263 assertFalse(encryptWithGoogle.disabled); |
| 246 assertFalse(encryptWithPassphrase.disabled); | 264 assertFalse(encryptWithPassphrase.disabled); |
| 247 | 265 |
| 248 assertTrue(encryptWithGoogle.checked); | 266 assertTrue(encryptWithGoogle.checked); |
| 249 | 267 |
| 250 // Select 'Encrypt with passphrase' to create a new passphrase. | 268 // Select 'Encrypt with passphrase' to create a new passphrase. |
| 251 assertFalse(!!syncPage.$$('#create-password-box')); | 269 assertFalse(!!syncPage.$$('#create-password-box')); |
| 252 | 270 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 }); | 463 }); |
| 446 }); | 464 }); |
| 447 } | 465 } |
| 448 | 466 |
| 449 return { | 467 return { |
| 450 registerTests: function() { | 468 registerTests: function() { |
| 451 registerAdvancedSyncSettingsTests(); | 469 registerAdvancedSyncSettingsTests(); |
| 452 }, | 470 }, |
| 453 }; | 471 }; |
| 454 }); | 472 }); |
| OLD | NEW |