Chromium Code Reviews| Index: ppapi/tests/test_input_event.cc |
| diff --git a/ppapi/tests/test_input_event.cc b/ppapi/tests/test_input_event.cc |
| index 73b76355bb31ee70dc093e6a98820484c285dd42..c0b49d567749efaeeae7465ca6d1c3b1d9574c77 100644 |
| --- a/ppapi/tests/test_input_event.cc |
| +++ b/ppapi/tests/test_input_event.cc |
| @@ -31,6 +31,10 @@ pp::Point GetCenter(const pp::Rect& rect) { |
| void TestInputEvent::RunTests(const std::string& filter) { |
| RUN_TEST(Events, filter); |
| + RUN_TEST(AcceptTouchEvent_1, filter); |
| + RUN_TEST(AcceptTouchEvent_2, filter); |
| + RUN_TEST(AcceptTouchEvent_3, filter); |
| + RUN_TEST(AcceptTouchEvent_4, filter); |
| } |
| TestInputEvent::TestInputEvent(TestingInstance* instance) |
| @@ -285,3 +289,47 @@ std::string TestInputEvent::TestEvents() { |
| PASS(); |
| } |
| +std::string TestInputEvent::TestAcceptTouchEvent_1() { |
|
brettw
2012/06/25 23:30:51
Can you add a comment above here explaining how th
sadrul
2012/06/28 16:38:04
Done.
|
| + instance_->set_remove_plugin(false); |
| + input_event_interface_->RequestInputEvents(instance_->pp_instance(), |
| + PP_INPUTEVENT_CLASS_MOUSE | |
| + PP_INPUTEVENT_CLASS_WHEEL | |
| + PP_INPUTEVENT_CLASS_KEYBOARD | |
| + PP_INPUTEVENT_CLASS_TOUCH); |
| + PASS(); |
| +} |
| + |
| +std::string TestInputEvent::TestAcceptTouchEvent_2() { |
| + instance_->set_remove_plugin(false); |
| + input_event_interface_->RequestInputEvents(instance_->pp_instance(), |
| + PP_INPUTEVENT_CLASS_MOUSE | |
| + PP_INPUTEVENT_CLASS_WHEEL | |
| + PP_INPUTEVENT_CLASS_KEYBOARD | |
| + PP_INPUTEVENT_CLASS_TOUCH); |
| + input_event_interface_->ClearInputEventRequest(instance_->pp_instance(), |
| + PP_INPUTEVENT_CLASS_TOUCH); |
| + PASS(); |
| +} |
| + |
| +std::string TestInputEvent::TestAcceptTouchEvent_3() { |
| + instance_->set_remove_plugin(false); |
| + input_event_interface_->RequestInputEvents(instance_->pp_instance(), |
| + PP_INPUTEVENT_CLASS_MOUSE | |
| + PP_INPUTEVENT_CLASS_WHEEL | |
| + PP_INPUTEVENT_CLASS_KEYBOARD); |
| + input_event_interface_->RequestFilteringInputEvents(instance_->pp_instance(), |
| + PP_INPUTEVENT_CLASS_TOUCH); |
| + PASS(); |
| +} |
| + |
| +std::string TestInputEvent::TestAcceptTouchEvent_4() { |
| + instance_->set_remove_plugin(false); |
| + input_event_interface_->RequestInputEvents(instance_->pp_instance(), |
| + PP_INPUTEVENT_CLASS_MOUSE | |
| + PP_INPUTEVENT_CLASS_WHEEL | |
| + PP_INPUTEVENT_CLASS_KEYBOARD); |
| + input_event_interface_->RequestInputEvents(instance_->pp_instance(), |
| + PP_INPUTEVENT_CLASS_TOUCH); |
| + PASS(); |
| +} |
| + |