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

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

Issue 2512323002: MD Settings: In /syncSetup clicking links in checkbox label should not check/uncheck. (Closed)
Patch Set: add @private annotation to sync page function Created 4 years 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/sync_page.js ('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_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
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
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 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/people_page/sync_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698