summaryrefslogtreecommitdiffstats
path: root/ppapi/native_client
diff options
context:
space:
mode:
authorpolina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-03 20:07:10 +0000
committerpolina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-03 20:07:10 +0000
commit6e6a0f5f3d7e4ffa39bf8a2d3057bbaf56f7f6aa (patch)
tree1e88a62ee8953be2124c2cc95b07880044b81d6a /ppapi/native_client
parent4d0df263a2891507742c8e3cec2929ae5f511200 (diff)
downloadchromium_src-6e6a0f5f3d7e4ffa39bf8a2d3057bbaf56f7f6aa.zip
chromium_src-6e6a0f5f3d7e4ffa39bf8a2d3057bbaf56f7f6aa.tar.gz
chromium_src-6e6a0f5f3d7e4ffa39bf8a2d3057bbaf56f7f6aa.tar.bz2
PPAPI SetFullscreen: Explicitely disallow state changes when the opposite
one is already pending. It is not clear what one should expect. Should the 2nd request override the 1st one? Should it be queued up and processed as if it was placed after the 1st one finished? Should it be ignored? In reality, the 2nd transitions does not occur while still messing up the state of 1st one (e.g. the window goes into fullscreen, but fullscreen DidChangeView never fires). Even with the JS interface, the behavior appears to be broken: http://www/~polina/fullscreen.html. Since the feature is not particularly useful, it is cleanest to just deny it in Pepper. BUG=41780 TEST=in CL Review URL: http://codereview.chromium.org/8093013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
-rw-r--r--ppapi/native_client/tests/ppapi_browser/ppb_fullscreen/ppapi_ppb_fullscreen.cc7
1 files changed, 5 insertions, 2 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);