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

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

Issue 2941433002: MD Settings: fix auto-focus on sync page. (Closed)
Patch Set: feedback Created 3 years, 6 months 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/test/data/webui/settings/cr_settings_interactive_ui_tests.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
(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 // Simulate event normally fired by main_page_behavior after subpage
27 // animation ends.
28 testElement.fire('show-container');
29 assertTrue(focused);
30 });
31 });
OLDNEW
« no previous file with comments | « chrome/test/data/webui/settings/cr_settings_interactive_ui_tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698