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

Unified Diff: chrome/browser/ui/views/frame/immersive_mode_controller_ash_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
« ash/wm/window_state.h ('K') | « ash/wm/window_state.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
index 3b5ee7c4c5240f2cccb0c283fb3f6621e7ecb155..fad6dffd3761c9c1231a97e1466c6cfedd4bea06 100644
--- a/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
+++ b/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
@@ -10,6 +10,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 "base/command_line.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/browser_commands.h"
@@ -262,6 +263,24 @@ TEST_F(ImmersiveModeControllerAshTest, TabAndBrowserFullscreen) {
EXPECT_TRUE(controller()->ShouldHideTabIndicators());
}
+// Check that the window state of a browser window gets properly marked for
+// immersive mode.
pkotwicz 2014/06/02 22:27:58 I don't think this test is useful. ImmersiveModeCo
Mr4D (OOO till 08-26) 2014/06/03 14:36:40 Yes, it is now - and if someone changes that it mi
pkotwicz 2014/06/03 15:15:02 You could theoretically make that argument for dup
+TEST_F(ImmersiveModeControllerAshTest, WindowStateImmersiveModeFullscreen) {
+ AddTab(browser(), GURL("about:blank"));
+
+ ash::wm::WindowState* window_state =
+ ash::wm::GetWindowState(browser()->window()->GetNativeWindow());
+
+ EXPECT_FALSE(window_state->in_immersive_fullscreen());
+ ToggleFullscreen();
+ ASSERT_TRUE(controller()->IsEnabled());
+ EXPECT_TRUE(window_state->in_immersive_fullscreen());
+
+ ToggleFullscreen();
+ ASSERT_FALSE(controller()->IsEnabled());
+ EXPECT_FALSE(window_state->in_immersive_fullscreen());
+}
+
class ImmersiveModeControllerAshTestHostedApp
: public ImmersiveModeControllerAshTest {
public:
« ash/wm/window_state.h ('K') | « ash/wm/window_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698