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

Side by Side Diff: chrome/test/base/interactive_test_utils.h

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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_TEST_BASE_INTERACTIVE_TEST_UTILS_H_ 5 #ifndef CHROME_TEST_BASE_INTERACTIVE_TEST_UTILS_H_
6 #define CHROME_TEST_BASE_INTERACTIVE_TEST_UTILS_H_ 6 #define CHROME_TEST_BASE_INTERACTIVE_TEST_UTILS_H_
7 7
8 #include "chrome/browser/ui/view_ids.h" 8 #include "chrome/browser/ui/view_ids.h"
9 #include "chrome/test/base/ui_test_utils.h" 9 #include "chrome/test/base/ui_test_utils.h"
10 #include "ui/base/test/ui_controls.h" 10 #include "ui/base/test/ui_controls.h"
(...skipping 13 matching lines...) Expand all
24 // Brings the native window for |browser| to the foreground. Returns true on 24 // Brings the native window for |browser| to the foreground. Returns true on
25 // success. 25 // success.
26 bool BringBrowserWindowToFront(const Browser* browser) WARN_UNUSED_RESULT; 26 bool BringBrowserWindowToFront(const Browser* browser) WARN_UNUSED_RESULT;
27 27
28 // Returns true if the View is focused. 28 // Returns true if the View is focused.
29 bool IsViewFocused(const Browser* browser, ViewID vid); 29 bool IsViewFocused(const Browser* browser, ViewID vid);
30 30
31 // Simulates a mouse click on a View in the browser. 31 // Simulates a mouse click on a View in the browser.
32 void ClickOnView(const Browser* browser, ViewID vid); 32 void ClickOnView(const Browser* browser, ViewID vid);
33 33
34 // Makes focus shift to the given View without clicking it.
35 void FocusView(const Browser* browser, ViewID vid);
36
34 // A collection of utilities that are used from interactive_ui_tests. These are 37 // A collection of utilities that are used from interactive_ui_tests. These are
35 // separated from ui_test_utils.h to ensure that browser_tests don't use them, 38 // separated from ui_test_utils.h to ensure that browser_tests don't use them,
36 // since they depend on focus which isn't possible for sharded test. 39 // since they depend on focus which isn't possible for sharded test.
37 40
38 // Hide a native window. 41 // Hide a native window.
39 void HideNativeWindow(gfx::NativeWindow window); 42 void HideNativeWindow(gfx::NativeWindow window);
40 43
41 // Show and focus a native window. Returns true on success. 44 // Show and focus a native window. Returns true on success.
42 bool ShowAndFocusNativeWindow(gfx::NativeWindow window) WARN_UNUSED_RESULT; 45 bool ShowAndFocusNativeWindow(gfx::NativeWindow window) WARN_UNUSED_RESULT;
43 46
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // ui_controls_linux.cc and ui_controls_mac.cc 140 // ui_controls_linux.cc and ui_controls_mac.cc
138 void ClickTask(ui_controls::MouseButton button, 141 void ClickTask(ui_controls::MouseButton button,
139 int state, 142 int state,
140 const base::Closure& followup); 143 const base::Closure& followup);
141 144
142 } // namespace internal 145 } // namespace internal
143 146
144 } // namespace ui_test_utils 147 } // namespace ui_test_utils
145 148
146 #endif // CHROME_TEST_BASE_INTERACTIVE_TEST_UTILS_H_ 149 #endif // CHROME_TEST_BASE_INTERACTIVE_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698