| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 UI_BASE_TEST_UI_CONTROLS_H_ | 5 #ifndef UI_BASE_TEST_UI_CONTROLS_H_ |
| 6 #define UI_BASE_TEST_UI_CONTROLS_H_ | 6 #define UI_BASE_TEST_UI_CONTROLS_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "ui/events/keycodes/keyboard_codes.h" | 10 #include "ui/events/keycodes/keyboard_codes.h" |
| 11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 12 | 12 |
| 13 namespace ui_controls { | 13 namespace ui_controls { |
| 14 | 14 |
| 15 // TODO(msw): Remove flaky test debug logging for http://crbug.com/639350. |
| 16 extern bool g_crbug_639350_logging; |
| 17 |
| 15 // A set of utility functions to generate native events in platform | 18 // A set of utility functions to generate native events in platform |
| 16 // independent way. Note that since the implementations depend on a window being | 19 // independent way. Note that since the implementations depend on a window being |
| 17 // top level, these can only be called from test suites that are not sharded. | 20 // top level, these can only be called from test suites that are not sharded. |
| 18 // For aura tests, please look into |aura::test:EventGenerator| first. This | 21 // For aura tests, please look into |aura::test:EventGenerator| first. This |
| 19 // class provides a way to emulate events in synchronous way and it is often | 22 // class provides a way to emulate events in synchronous way and it is often |
| 20 // easier to write tests with this class than using |ui_controls|. | 23 // easier to write tests with this class than using |ui_controls|. |
| 21 // | 24 // |
| 22 // Many of the functions in this class include a variant that takes a Closure. | 25 // Many of the functions in this class include a variant that takes a Closure. |
| 23 // The version that takes a Closure waits until the generated event is | 26 // The version that takes a Closure waits until the generated event is |
| 24 // processed. Once the generated event is processed the Closure is Run (and | 27 // processed. Once the generated event is processed the Closure is Run (and |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 #if defined(OS_MACOSX) | 107 #if defined(OS_MACOSX) |
| 105 // Returns true when tests need to use extra Tab and Shift-Tab key events | 108 // Returns true when tests need to use extra Tab and Shift-Tab key events |
| 106 // to traverse to the desired item; because the application is configured to | 109 // to traverse to the desired item; because the application is configured to |
| 107 // traverse more elements for accessibility reasons. | 110 // traverse more elements for accessibility reasons. |
| 108 bool IsFullKeyboardAccessEnabled(); | 111 bool IsFullKeyboardAccessEnabled(); |
| 109 #endif | 112 #endif |
| 110 | 113 |
| 111 } // namespace ui_controls | 114 } // namespace ui_controls |
| 112 | 115 |
| 113 #endif // UI_BASE_TEST_UI_CONTROLS_H_ | 116 #endif // UI_BASE_TEST_UI_CONTROLS_H_ |
| OLD | NEW |