| 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" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // Send a key press with/without modifier keys. | 37 // Send a key press with/without modifier keys. |
| 38 // | 38 // |
| 39 // If you're writing a test chances are you want the variant in ui_test_utils. | 39 // If you're writing a test chances are you want the variant in ui_test_utils. |
| 40 // See it for details. | 40 // See it for details. |
| 41 | 41 |
| 42 // Per the above comment, these methods can only be called from non-sharded test | 42 // Per the above comment, these methods can only be called from non-sharded test |
| 43 // suites. This method ensures that they're not accidently called by sharded | 43 // suites. This method ensures that they're not accidently called by sharded |
| 44 // tests. | 44 // tests. |
| 45 void EnableUIControls(); | 45 void EnableUIControls(); |
| 46 | 46 |
| 47 #if defined(OS_MACOSX) |
| 48 bool IsUIControlsEnabled(); |
| 49 #endif |
| 50 |
| 47 bool SendKeyPress(gfx::NativeWindow window, | 51 bool SendKeyPress(gfx::NativeWindow window, |
| 48 ui::KeyboardCode key, | 52 ui::KeyboardCode key, |
| 49 bool control, | 53 bool control, |
| 50 bool shift, | 54 bool shift, |
| 51 bool alt, | 55 bool alt, |
| 52 bool command); | 56 bool command); |
| 53 bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window, | 57 bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window, |
| 54 ui::KeyboardCode key, | 58 ui::KeyboardCode key, |
| 55 bool control, | 59 bool control, |
| 56 bool shift, | 60 bool shift, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 #if defined(OS_MACOSX) | 104 #if defined(OS_MACOSX) |
| 101 // Returns true when tests need to use extra Tab and Shift-Tab key events | 105 // Returns true when tests need to use extra Tab and Shift-Tab key events |
| 102 // to traverse to the desired item; because the application is configured to | 106 // to traverse to the desired item; because the application is configured to |
| 103 // traverse more elements for accessibility reasons. | 107 // traverse more elements for accessibility reasons. |
| 104 bool IsFullKeyboardAccessEnabled(); | 108 bool IsFullKeyboardAccessEnabled(); |
| 105 #endif | 109 #endif |
| 106 | 110 |
| 107 } // namespace ui_controls | 111 } // namespace ui_controls |
| 108 | 112 |
| 109 #endif // UI_BASE_TEST_UI_CONTROLS_H_ | 113 #endif // UI_BASE_TEST_UI_CONTROLS_H_ |
| OLD | NEW |