OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 suite('sync-page-test', function() { | |
6 /** @type {SyncPageElement} */ var testElement; | |
7 | |
8 setup(function() { | |
9 PolymerTest.clearBody(); | |
10 | |
11 testElement = document.createElement('settings-sync-page'); | |
12 document.body.appendChild(testElement); | |
13 }); | |
14 | |
15 test('autofocus correctly after container is shown', function() { | |
16 cr.webUIListenerCallback('sync-prefs-changed', {passphraseRequired: true}); | |
17 Polymer.dom.flush(); | |
18 | |
19 var input = testElement.$$('#existingPassphraseInput'); | |
20 | |
21 var focused = false; | |
22 input.addEventListener('focus', function() { | |
23 focused = true; | |
24 }); | |
25 | |
26 testElement.fire('show-container'); | |
dpapad
2017/06/14 01:02:00
Nit: Maybe add a short comment
// Simulate event
| |
27 assertTrue(focused); | |
28 }); | |
29 }); | |
OLD | NEW |