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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 assertFalse(encryptWithPassphrase.disabled); | 267 assertFalse(encryptWithPassphrase.disabled); |
268 assertFalse(encryptWithPassphrase.checked); | 268 assertFalse(encryptWithPassphrase.checked); |
269 | 269 |
270 var link = encryptWithPassphrase.querySelector('a[href]'); | 270 var link = encryptWithPassphrase.querySelector('a[href]'); |
271 assertTrue(!!link); | 271 assertTrue(!!link); |
272 | 272 |
273 // Suppress opening a new tab, since then the test will continue running | 273 // Suppress opening a new tab, since then the test will continue running |
274 // on a background tab (which has throttled timers) and will timeout. | 274 // on a background tab (which has throttled timers) and will timeout. |
275 link.target = ''; | 275 link.target = ''; |
276 link.href = '#'; | 276 link.href = '#'; |
| 277 // Prevent the link from triggering a page navigation when tapped. |
| 278 // Breaks the test in Vulcanized mode. |
| 279 link.addEventListener('tap', function(e) { e.preventDefault(); }); |
277 | 280 |
278 MockInteractions.tap(link); | 281 MockInteractions.tap(link); |
279 | 282 |
280 assertFalse(encryptWithPassphrase.checked); | 283 assertFalse(encryptWithPassphrase.checked); |
281 }); | 284 }); |
282 | 285 |
283 test('SaveButtonDisabledWhenPassphraseOrConfirmationEmpty', function() { | 286 test('SaveButtonDisabledWhenPassphraseOrConfirmationEmpty', function() { |
284 MockInteractions.tap(encryptWithPassphrase); | 287 MockInteractions.tap(encryptWithPassphrase); |
285 Polymer.dom.flush(); | 288 Polymer.dom.flush(); |
286 | 289 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 }); | 465 }); |
463 }); | 466 }); |
464 } | 467 } |
465 | 468 |
466 return { | 469 return { |
467 registerTests: function() { | 470 registerTests: function() { |
468 registerAdvancedSyncSettingsTests(); | 471 registerAdvancedSyncSettingsTests(); |
469 }, | 472 }, |
470 }; | 473 }; |
471 }); | 474 }); |
OLD | NEW |