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

Unified Diff: chrome/test/data/webui/settings/startup_urls_page_test.js

Issue 2653023003: MD Settings: Update some dialogs to accept Enter key. (Closed)
Patch Set: add a test for one of them Created 3 years, 11 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/browser/resources/settings/search_engines_page/search_engine_dialog.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/startup_urls_page_test.js
diff --git a/chrome/test/data/webui/settings/startup_urls_page_test.js b/chrome/test/data/webui/settings/startup_urls_page_test.js
index a0fa115ee31aee1a11d0b6d562772c62f41b549c..e6a8c0c30bf3516fddf4e6d1bcca850c29d8f9de 100644
--- a/chrome/test/data/webui/settings/startup_urls_page_test.js
+++ b/chrome/test/data/webui/settings/startup_urls_page_test.js
@@ -183,6 +183,22 @@ cr.define('settings_startup_urls_page', function() {
document.body.appendChild(dialog);
return testProxyCalled('editStartupPage');
});
+
+ test('Enter key submits', function() {
+ document.body.appendChild(dialog);
+
+ // Input a URL and force validation.
+ var inputElement = dialog.$.url;
+ inputElement.value = 'foo.com';
+ pressSpace(inputElement);
+
+ return browserProxy.whenCalled('validateStartupPage').then(function() {
+ MockInteractions.keyEventOn(
+ inputElement, 'keypress', 13, undefined, 'Enter');
+
+ return browserProxy.whenCalled('addStartupPage');
+ });
+ });
});
suite('StartupUrlsPage', function() {
« no previous file with comments | « chrome/browser/resources/settings/search_engines_page/search_engine_dialog.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698