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

Unified Diff: chrome/test/base/interactive_test_utils_mac.mm

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: Spel more gooder 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.h ('k') | chrome/test/base/interactive_test_utils_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/interactive_test_utils_mac.mm
diff --git a/chrome/test/base/interactive_test_utils_mac.mm b/chrome/test/base/interactive_test_utils_mac.mm
index e2d5cdb5fa17b0210ee3a2fe54d8cd36e0522d80..488f5c6a984486d2a1ee2c21d373731dce65d1c5 100644
--- a/chrome/test/base/interactive_test_utils_mac.mm
+++ b/chrome/test/base/interactive_test_utils_mac.mm
@@ -77,6 +77,13 @@ void ClickOnView(const Browser* browser, ViewID vid) {
base::MessageLoop::QuitClosure());
content::RunMessageLoop();
}
+void FocusView(const Browser* browser, ViewID vid) {
msw 2014/09/03 18:21:24 nit: blank line above.
tapted 2014/09/05 13:01:13 Done.
+ NSWindow* window = browser->window()->GetNativeWindow();
+ DCHECK(window);
+ NSView* view = view_id_util::GetView(window, vid);
+ DCHECK(view);
+ [window makeFirstResponder:view];
+ }
void HideNativeWindow(gfx::NativeWindow window) {
[window orderOut:nil];
« no previous file with comments | « chrome/test/base/interactive_test_utils.h ('k') | chrome/test/base/interactive_test_utils_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698