Chromium Code Reviews| 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; | |
|
dpapad
2016/11/19 02:04:38
Probably worth ensuring that the parentElement/par
scottchen
2016/11/21 18:33:46
Done.
| |
| 251 assertFalse(link.parentNode.disabled); | |
| 252 assertTrue(link.parentNode.checked); | |
| 253 | |
| 254 MockInteractions.tap(link); | |
| 255 | |
| 256 // The checkbox value should be unchanged after clicking on the link | |
|
dpapad
2016/11/19 02:04:38
Comments should have proper punctuation per style
scottchen
2016/11/21 18:33:46
Done.
| |
| 257 assertTrue(link.parentNode.checked); | |
| 258 }); | |
| 259 | |
| 243 test('RadioBoxesEnabledWhenUnencrypted', function() { | 260 test('RadioBoxesEnabledWhenUnencrypted', function() { |
| 244 // Verify that the encryption radio boxes are enabled. | 261 // Verify that the encryption radio boxes are enabled. |
| 245 assertFalse(encryptWithGoogle.disabled); | 262 assertFalse(encryptWithGoogle.disabled); |
| 246 assertFalse(encryptWithPassphrase.disabled); | 263 assertFalse(encryptWithPassphrase.disabled); |
| 247 | 264 |
| 248 assertTrue(encryptWithGoogle.checked); | 265 assertTrue(encryptWithGoogle.checked); |
| 249 | 266 |
| 250 // Select 'Encrypt with passphrase' to create a new passphrase. | 267 // Select 'Encrypt with passphrase' to create a new passphrase. |
| 251 assertFalse(!!syncPage.$$('#create-password-box')); | 268 assertFalse(!!syncPage.$$('#create-password-box')); |
| 252 | 269 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 445 }); | 462 }); |
| 446 }); | 463 }); |
| 447 } | 464 } |
| 448 | 465 |
| 449 return { | 466 return { |
| 450 registerTests: function() { | 467 registerTests: function() { |
| 451 registerAdvancedSyncSettingsTests(); | 468 registerAdvancedSyncSettingsTests(); |
| 452 }, | 469 }, |
| 453 }; | 470 }; |
| 454 }); | 471 }); |
| OLD | NEW |