Chromium Code Reviews| Index: ppapi/tests/test_fullscreen.cc |
| =================================================================== |
| --- ppapi/tests/test_fullscreen.cc (revision 112536) |
| +++ ppapi/tests/test_fullscreen.cc (working copy) |
| @@ -85,6 +85,7 @@ |
| // The transition is asynchronous and ends at the next DidChangeView(). |
| // No graphics devices can be bound while in transition. |
| instance_->RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE); |
| + SimulateUserGesture(); |
| // HandleInputEvent() will call SetFullscreen(true). |
| // DidChangeView() will call the callback once in fullscreen mode. |
| fullscreen_callback_.WaitForResult(); |
| @@ -136,6 +137,25 @@ |
| PASS(); |
| } |
| +void TestFullscreen::SimulateUserGesture() { |
| + pp::Point plugin_center( |
| + normal_position_.x() + normal_position_.width() / 2, |
| + normal_position_.y() + normal_position_.height() / 2); |
| + pp::Point mouse_movement; |
| + pp::MouseInputEvent input_event( |
| + instance_, |
|
brettw
2011/12/04 01:19:06
Style nit: these should all be indented 2 more spa
bbudge
2011/12/07 19:20:02
Done.
|
| + PP_INPUTEVENT_TYPE_MOUSEDOWN, |
| + 0, // time_stamp |
| + 0, // modifiers |
| + PP_INPUTEVENT_MOUSEBUTTON_LEFT, |
| + plugin_center, |
| + 1, // click_count |
| + mouse_movement); |
| + |
| + testing_interface_->SimulateInputEvent(instance_->pp_instance(), |
| + input_event.pp_resource()); |
| +} |
| + |
| void TestFullscreen::FailFullscreenTest(const std::string& error) { |
| screen_mode_.SetFullscreen(false); |
| fullscreen_pending_ = false; |