| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 PPAPI_TESTS_TEST_INPUT_EVENT_H_ | 5 #ifndef PPAPI_TESTS_TEST_INPUT_EVENT_H_ |
| 6 #define PPAPI_TESTS_TEST_INPUT_EVENT_H_ | 6 #define PPAPI_TESTS_TEST_INPUT_EVENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 pp::InputEvent CreateMouseEvent(PP_InputEvent_Type type, | 36 pp::InputEvent CreateMouseEvent(PP_InputEvent_Type type, |
| 37 PP_InputEvent_MouseButton buttons); | 37 PP_InputEvent_MouseButton buttons); |
| 38 pp::InputEvent CreateWheelEvent(); | 38 pp::InputEvent CreateWheelEvent(); |
| 39 pp::InputEvent CreateKeyEvent(PP_InputEvent_Type type, | 39 pp::InputEvent CreateKeyEvent(PP_InputEvent_Type type, |
| 40 uint32_t key_code); | 40 uint32_t key_code); |
| 41 pp::InputEvent CreateCharEvent(const std::string& text); | 41 pp::InputEvent CreateCharEvent(const std::string& text); |
| 42 | 42 |
| 43 bool SimulateInputEvent(const pp::InputEvent& input_event); | 43 bool SimulateInputEvent(const pp::InputEvent& input_event); |
| 44 bool AreEquivalentEvents(PP_Resource first, PP_Resource second); | 44 bool IsExpectedEvent(PP_Resource input_event); |
| 45 | 45 |
| 46 std::string TestEvents(); | 46 std::string TestEvents(); |
| 47 | 47 |
| 48 const struct PPB_InputEvent* input_event_interface_; | 48 const struct PPB_InputEvent* input_event_interface_; |
| 49 const struct PPB_MouseInputEvent* mouse_input_event_interface_; | 49 const struct PPB_MouseInputEvent* mouse_input_event_interface_; |
| 50 const struct PPB_WheelInputEvent* wheel_input_event_interface_; | 50 const struct PPB_WheelInputEvent* wheel_input_event_interface_; |
| 51 const struct PPB_KeyboardInputEvent* keyboard_input_event_interface_; | 51 const struct PPB_KeyboardInputEvent* keyboard_input_event_interface_; |
| 52 | 52 |
| 53 pp::Rect view_rect_; | 53 pp::Rect view_rect_; |
| 54 pp::InputEvent expected_input_event_; | 54 PP_InputEvent_Type expected_event_type_; |
| 55 PP_InputEvent_MouseButton expected_mouse_buttons_; |
| 56 int32_t expected_mouse_click_count_; |
| 57 pp::FloatPoint expected_wheel_delta_; |
| 58 pp::FloatPoint expected_wheel_ticks_; |
| 59 PP_Bool expected_wheel_scroll_by_page_; |
| 60 uint32_t expected_key_code_; |
| 61 std::string expected_char_text_; |
| 55 bool received_expected_event_; | 62 bool received_expected_event_; |
| 56 bool received_finish_message_; | 63 bool received_finish_message_; |
| 57 }; | 64 }; |
| 58 | 65 |
| 59 #endif // PPAPI_TESTS_TEST_INPUT_EVENT_H_ | 66 #endif // PPAPI_TESTS_TEST_INPUT_EVENT_H_ |
| 60 | 67 |
| OLD | NEW |