Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2906)

Unified Diff: ash/wm/immersive_fullscreen_controller_unittest.cc

Issue 309793005: Fixing problem with edge swipe exiting immersive mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/wm/immersive_fullscreen_controller_unittest.cc
diff --git a/ash/wm/immersive_fullscreen_controller_unittest.cc b/ash/wm/immersive_fullscreen_controller_unittest.cc
index 3ff1a10fb4bf3cf3ae770419e024b4276585069b..ab7bf69281eb9c14a469b485f16e45aace1faa73 100644
--- a/ash/wm/immersive_fullscreen_controller_unittest.cc
+++ b/ash/wm/immersive_fullscreen_controller_unittest.cc
@@ -11,6 +11,7 @@
#include "ash/shelf/shelf_types.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
+#include "ash/wm/window_state.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/env.h"
@@ -779,6 +780,20 @@ TEST_F(ImmersiveFullscreenControllerTest, EventsDoNotLeakToWindowUnderneath) {
EXPECT_EQ(window(), targeter->FindTargetForEvent(root, &touch2));
}
+// Check that the window state gets properly marked for immersive mode.
pkotwicz 2014/06/02 22:27:58 Nit: immersive mode -> immersive fullscreen
Mr4D (OOO till 08-26) 2014/06/03 14:36:40 Somehow that is odd since there are several files
+TEST_F(ImmersiveFullscreenControllerTest, WindowStateImmersiveModeFullscreen) {
+ ash::wm::WindowState* window_state = ash::wm::GetWindowState(window());
+
+ EXPECT_FALSE(window_state->in_immersive_fullscreen());
+ SetEnabled(true);
+ ASSERT_TRUE(controller()->IsEnabled());
+ EXPECT_TRUE(window_state->in_immersive_fullscreen());
+
+ SetEnabled(false);
+ ASSERT_FALSE(controller()->IsEnabled());
+ EXPECT_FALSE(window_state->in_immersive_fullscreen());
+}
+
// Do not test under windows because focus testing is not reliable on
// Windows. (crbug.com/79493)
#if !defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698