| OLD | NEW |
| 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 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 17 matching lines...) Expand all Loading... |
| 28 virtual bool Init(); | 28 virtual bool Init(); |
| 29 virtual void RunTests(const std::string& test_filter); | 29 virtual void RunTests(const std::string& test_filter); |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 pp::InputEvent CreateMouseEvent(PP_InputEvent_Type type, | 32 pp::InputEvent CreateMouseEvent(PP_InputEvent_Type type, |
| 33 PP_InputEvent_MouseButton buttons); | 33 PP_InputEvent_MouseButton buttons); |
| 34 pp::InputEvent CreateWheelEvent(); | 34 pp::InputEvent CreateWheelEvent(); |
| 35 pp::InputEvent CreateKeyEvent(PP_InputEvent_Type type, | 35 pp::InputEvent CreateKeyEvent(PP_InputEvent_Type type, |
| 36 uint32_t key_code); | 36 uint32_t key_code); |
| 37 pp::InputEvent CreateCharEvent(const std::string& text); | 37 pp::InputEvent CreateCharEvent(const std::string& text); |
| 38 pp::InputEvent CreateTouchEvent(PP_InputEvent_Type type, |
| 39 const pp::FloatPoint& location); |
| 38 | 40 |
| 39 bool SimulateInputEvent(const pp::InputEvent& input_event); | 41 bool SimulateInputEvent(const pp::InputEvent& input_event); |
| 40 bool AreEquivalentEvents(PP_Resource first, PP_Resource second); | 42 bool AreEquivalentEvents(PP_Resource first, PP_Resource second); |
| 41 | 43 |
| 42 std::string TestEvents(); | 44 std::string TestEvents(); |
| 43 std::string TestAcceptTouchEvent_1(); | 45 std::string TestAcceptTouchEvent_1(); |
| 44 std::string TestAcceptTouchEvent_2(); | 46 std::string TestAcceptTouchEvent_2(); |
| 45 std::string TestAcceptTouchEvent_3(); | 47 std::string TestAcceptTouchEvent_3(); |
| 46 std::string TestAcceptTouchEvent_4(); | 48 std::string TestAcceptTouchEvent_4(); |
| 47 | 49 |
| 48 const PPB_InputEvent* input_event_interface_; | 50 const PPB_InputEvent* input_event_interface_; |
| 49 const PPB_MouseInputEvent* mouse_input_event_interface_; | 51 const PPB_MouseInputEvent* mouse_input_event_interface_; |
| 50 const PPB_WheelInputEvent* wheel_input_event_interface_; | 52 const PPB_WheelInputEvent* wheel_input_event_interface_; |
| 51 const PPB_KeyboardInputEvent* keyboard_input_event_interface_; | 53 const PPB_KeyboardInputEvent* keyboard_input_event_interface_; |
| 54 const PPB_TouchInputEvent* touch_input_event_interface_; |
| 52 | 55 |
| 53 pp::Rect view_rect_; | 56 pp::Rect view_rect_; |
| 54 pp::InputEvent expected_input_event_; | 57 pp::InputEvent expected_input_event_; |
| 55 bool received_expected_event_; | 58 bool received_expected_event_; |
| 56 bool received_finish_message_; | 59 bool received_finish_message_; |
| 57 }; | 60 }; |
| 58 | 61 |
| 59 #endif // PPAPI_TESTS_TEST_INPUT_EVENT_H_ | 62 #endif // PPAPI_TESTS_TEST_INPUT_EVENT_H_ |
| OLD | NEW |