Index: chrome/browser/ui/ash/chrome_shell_delegate_browsertest.cc |
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_browsertest.cc b/chrome/browser/ui/ash/chrome_shell_delegate_browsertest.cc |
index b06b048ec9fe8f24d2171dcde7600b1c9cb7c5b1..3f821e18ff119268c450784c88aace1a57705eac 100644 |
--- a/chrome/browser/ui/ash/chrome_shell_delegate_browsertest.cc |
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_browsertest.cc |
@@ -11,6 +11,7 @@ |
#include "ash/shell_delegate.h" |
#include "ash/wm/window_properties.h" |
#include "ash/wm/window_state.h" |
+#include "ash/wm/wm_types.h" |
#include "base/command_line.h" |
#include "chrome/browser/apps/app_browsertest_util.h" |
#include "chrome/browser/ui/browser.h" |
@@ -23,16 +24,14 @@ |
namespace { |
-// Returns true if |window| is in immersive fullscreen. Infer whether |window| |
-// is in immersive fullscreen based on whether kFullscreenUsesMinimalChromeKey |
-// is set for |window| because DEPS does not allow the test to use BrowserView. |
-// (This is not quite right because if a window is in both immersive browser |
-// fullscreen and in tab fullscreen, kFullScreenUsesMinimalChromeKey will |
-// not be set). |
+// Returns true if |window| is in immersive fullscreen. |
bool IsInImmersiveFullscreen(BrowserWindow* browser_window) { |
- return browser_window->IsFullscreen() && |
+ if (!browser_window->IsFullscreen()) |
+ return false; |
+ ash::wm::FullscreenType fullscreen_type = |
browser_window->GetNativeWindow()->GetProperty( |
- ash::internal::kFullscreenUsesMinimalChromeKey); |
+ ash::internal::kFullscreenTypeKey); |
+ return ash::wm::IsImmersiveFullscreenType(fullscreen_type); |
} |
} // namespace |