Index: ppapi/tests/test_fullscreen.cc |
=================================================================== |
--- ppapi/tests/test_fullscreen.cc (revision 113618) |
+++ 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_, |
+ 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; |