diff options
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/native_client/tests/ppapi_browser/ppb_fullscreen/ppapi_ppb_fullscreen.cc | 7 | ||||
-rw-r--r-- | ppapi/tests/test_fullscreen.cc | 10 |
2 files changed, 13 insertions, 4 deletions
diff --git a/ppapi/native_client/tests/ppapi_browser/ppb_fullscreen/ppapi_ppb_fullscreen.cc b/ppapi/native_client/tests/ppapi_browser/ppb_fullscreen/ppapi_ppb_fullscreen.cc index 959b7bb..4a87752 100644 --- a/ppapi/native_client/tests/ppapi_browser/ppb_fullscreen/ppapi_ppb_fullscreen.cc +++ b/ppapi/native_client/tests/ppapi_browser/ppb_fullscreen/ppapi_ppb_fullscreen.cc @@ -120,8 +120,9 @@ void TestSetFullscreenFalse() { // The transition is asynchronous and ends at the next DidChangeView(). EXPECT(ppb->SetFullscreen(pp_instance(), PP_FALSE) == PP_TRUE); g_normal_pending = true; - // Transition is pending, so repeated requests fail. + // Transition is pending, so additional requests fail. EXPECT(ppb->SetFullscreen(pp_instance(), PP_FALSE) == PP_FALSE); + EXPECT(ppb->SetFullscreen(pp_instance(), PP_TRUE) == PP_FALSE); EXPECT(ppb->IsFullscreen(pp_instance()) == PP_TRUE); // No 2D or 3D device can be bound during transition. EXPECT(PPBGraphics2D()->IsGraphics2D(g_graphics2d) == PP_TRUE); @@ -182,8 +183,10 @@ PP_Bool HandleInputEvent(PP_Instance instance, PP_Resource event) { EXPECT(CreateGraphics2D(&g_graphics2d)); EXPECT(PPBFullscreenDev()->SetFullscreen(pp_instance(), PP_TRUE) == PP_TRUE); g_fullscreen_pending = true; - // Transition is pending, so repeated requests fail. + // Transition is pending, so additional requests fail. EXPECT(PPBFullscreenDev()->SetFullscreen(pp_instance(), PP_TRUE) == PP_FALSE); + EXPECT(PPBFullscreenDev()->SetFullscreen(pp_instance(), PP_FALSE) == + PP_FALSE); EXPECT(PPBFullscreenDev()->IsFullscreen(pp_instance()) == PP_FALSE); // No 2D or 3D device can be bound during transition. EXPECT(PPBGraphics2D()->IsGraphics2D(g_graphics2d) == PP_TRUE); diff --git a/ppapi/tests/test_fullscreen.cc b/ppapi/tests/test_fullscreen.cc index 226d03d..95a0dd7 100644 --- a/ppapi/tests/test_fullscreen.cc +++ b/ppapi/tests/test_fullscreen.cc @@ -109,9 +109,11 @@ std::string TestFullscreen::TestNormalToFullscreenToNormal() { normal_pending_ = true; if (!screen_mode_.SetFullscreen(false)) return ReportError("SetFullscreen(false) in fullscreen", false); - // Normal is now pending, so repeated requests should fail. + // Normal is now pending, so additional requests should fail. if (screen_mode_.SetFullscreen(false)) return ReportError("SetFullscreen(false) in normal pending", true); + if (screen_mode_.SetFullscreen(true)) + return ReportError("SetFullscreen(true) in normal pending", true); if (instance_->BindGraphics(graphics2d_normal_)) return ReportError("BindGraphics() in normal transition", true); if (!screen_mode_.IsFullscreen()) @@ -154,12 +156,16 @@ bool TestFullscreen::HandleInputEvent(const pp::InputEvent& event) { FailFullscreenTest(ReportError("SetFullscreen(true) in normal", false)); return false; } - // Fullscreen is now pending, so repeated requests should fail. + // Fullscreen is now pending, so additional requests should fail. if (screen_mode_.SetFullscreen(true)) { FailFullscreenTest( ReportError("SetFullscreen(true) in fullscreen pending", true)); return false; } + if (screen_mode_.SetFullscreen(false)) { + FailFullscreenTest( + ReportError("SetFullscreen(false) in fullscreen pending", true)); + } // No graphics devices can be bound while in transition. if (instance_->BindGraphics(graphics2d_fullscreen_)) { FailFullscreenTest( |