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

Unified Diff: chrome/browser/chromeos/accessibility/sticky_keys_browsertest.cc

Issue 598733002: Support search as a sticky key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Add Search+Left test. Created 6 years, 3 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 | « ash/sticky_keys/sticky_keys_controller.cc ('k') | chrome/browser/chromeos/events/event_rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/accessibility/sticky_keys_browsertest.cc
diff --git a/chrome/browser/chromeos/accessibility/sticky_keys_browsertest.cc b/chrome/browser/chromeos/accessibility/sticky_keys_browsertest.cc
index a1c3e1fb7503f501f435f01fe3dc7f893ba66a1a..a57006f97a981c4b153a24eb465d3b844637fd1c 100644
--- a/chrome/browser/chromeos/accessibility/sticky_keys_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/sticky_keys_browsertest.cc
@@ -9,6 +9,9 @@
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/location_bar/location_bar.h"
+#include "chrome/browser/ui/omnibox/omnibox_view.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/common/pref_names.h"
@@ -139,4 +142,34 @@ IN_PROC_BROWSER_TEST_F(StickyKeysBrowserTest, CtrlClickHomeButton) {
EXPECT_EQ(tab_count, tab_strip_model->count());
}
+IN_PROC_BROWSER_TEST_F(StickyKeysBrowserTest, SearchLeftOmnibox) {
+ EnableStickyKeys();
+
+ OmniboxView* omnibox =
+ browser()->window()->GetLocationBar()->GetOmniboxView();
+
+ // Give the omnibox focus.
+ omnibox->ShowURL();
+
+ // Type 'foo'.
+ SendKeyPress(ui::VKEY_F);
+ SendKeyPress(ui::VKEY_O);
+ SendKeyPress(ui::VKEY_O);
+
+ // Verify the location of the caret.
+ size_t start, end;
+ omnibox->GetSelectionBounds(&start, &end);
+ ASSERT_EQ(3U, start);
+ ASSERT_EQ(3U, end);
+
+ // Hit Home by sequencing Search (left Windows) and Left (arrow).
+ SendKeyPress(ui::VKEY_LWIN);
+ SendKeyPress(ui::VKEY_LEFT);
+
+ // Verify caret moved to the beginning.
+ omnibox->GetSelectionBounds(&start, &end);
+ ASSERT_EQ(0U, start);
+ ASSERT_EQ(0U, end);
+}
+
} // namespace chromeos
« no previous file with comments | « ash/sticky_keys/sticky_keys_controller.cc ('k') | chrome/browser/chromeos/events/event_rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698