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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/settings/people_page_sync_page_interactive_test.js
diff --git a/chrome/test/data/webui/settings/people_page_sync_page_interactive_test.js b/chrome/test/data/webui/settings/people_page_sync_page_interactive_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..d2c4208391da169f50fcf5b18cfe3140c60c1f45
--- /dev/null
+++ b/chrome/test/data/webui/settings/people_page_sync_page_interactive_test.js
@@ -0,0 +1,31 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+suite('sync-page-test', function() {
+ /** @type {SyncPageElement} */ var testElement;
+
+ setup(function() {
+ PolymerTest.clearBody();
+
+ testElement = document.createElement('settings-sync-page');
+ document.body.appendChild(testElement);
+ });
+
+ test('autofocus correctly after container is shown', function() {
+ cr.webUIListenerCallback('sync-prefs-changed', {passphraseRequired: true});
+ Polymer.dom.flush();
+
+ var input = testElement.$$('#existingPassphraseInput');
+
+ var focused = false;
+ input.addEventListener('focus', function() {
+ focused = true;
+ });
+
+ // Simulate event normally fired by main_page_behavior after subpage
+ // animation ends.
+ testElement.fire('show-container');
+ assertTrue(focused);
+ });
+});
« 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