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

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: test removed 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
« no previous file with comments | « ash/wm/immersive_fullscreen_controller.cc ('k') | ash/wm/maximize_mode/maximize_mode_window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..96391a1c4653967fae5175237be63a60d275ed9d 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 fullscreen.
+TEST_F(ImmersiveFullscreenControllerTest, WindowStateImmersiveFullscreen) {
+ 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)
« no previous file with comments | « ash/wm/immersive_fullscreen_controller.cc ('k') | ash/wm/maximize_mode/maximize_mode_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698