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

Unified Diff: chrome/test/base/interactive_test_utils_views.cc

Issue 534993002: Introduce ui_test_utils::FocusView and de-flake OmniboxViewTest.BeginningShownAfterBlur (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops - missing newline 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 | « chrome/test/base/interactive_test_utils_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/interactive_test_utils_views.cc
diff --git a/chrome/test/base/interactive_test_utils_views.cc b/chrome/test/base/interactive_test_utils_views.cc
index 67bcf63360c9112431c9d13dee4eff76e2f3ac17..ac5047fa6fc3204231e7ce58185e7fa893490676 100644
--- a/chrome/test/base/interactive_test_utils_views.cc
+++ b/chrome/test/base/interactive_test_utils_views.cc
@@ -43,6 +43,13 @@ void ClickOnView(const Browser* browser, ViewID vid) {
content::RunMessageLoop();
}
+void FocusView(const Browser* browser, ViewID vid) {
+ views::View* view =
+ BrowserView::GetBrowserViewForBrowser(browser)->GetViewByID(vid);
+ DCHECK(view);
+ view->RequestFocus();
+}
+
#endif // defined(OS_MACOSX)
void MoveMouseToCenterAndPress(views::View* view,
« no previous file with comments | « chrome/test/base/interactive_test_utils_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698