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

Unified Diff: chrome/browser/ui/fullscreen/fullscreen_controller_state_test.cc

Issue 12018007: Refactor BrowserWindow fullscreen and presentation on Mac to be consistent with other platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge TOT Created 7 years, 11 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: chrome/browser/ui/fullscreen/fullscreen_controller_state_test.cc
diff --git a/chrome/browser/ui/fullscreen/fullscreen_controller_state_test.cc b/chrome/browser/ui/fullscreen/fullscreen_controller_state_test.cc
index 3a9134127a62663a8ad32ebde68294ab366bb89a..1696e20c77324d368f95554c19cc72e3beda6462 100644
--- a/chrome/browser/ui/fullscreen/fullscreen_controller_state_test.cc
+++ b/chrome/browser/ui/fullscreen/fullscreen_controller_state_test.cc
@@ -16,6 +16,10 @@
#include "content/public/common/url_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(OS_MACOSX)
+#include "base/mac/mac_util.h"
+#endif
+
FullscreenControllerStateTest::FullscreenControllerStateTest()
: state_(STATE_NORMAL),
reentrant_(false) {
@@ -293,7 +297,11 @@ bool FullscreenControllerStateTest::InvokeEvent(Event event) {
switch (event) {
case TOGGLE_FULLSCREEN:
+#if defined(OS_MACOSX)
+ GetFullscreenController()->TogglePresentationMode();
+#else
GetFullscreenController()->ToggleFullscreenMode();
+#endif
break;
case TAB_FULLSCREEN_TRUE:
GetFullscreenController()->ToggleFullscreenModeForTab(
@@ -343,7 +351,9 @@ void FullscreenControllerStateTest::VerifyWindowState() {
switch (state_) {
case STATE_NORMAL:
#if defined(OS_MACOSX)
- EXPECT_FALSE(GetBrowser()->window()->InPresentationMode())
+ EXPECT_FALSE(GetBrowser()->window()->IsFullscreenWithChrome())
+ << GetAndClearDebugLog();
+ EXPECT_FALSE(GetBrowser()->window()->IsFullscreenWithoutChrome())
<< GetAndClearDebugLog();
#endif
EXPECT_FALSE(GetFullscreenController()->IsFullscreenForBrowser())
@@ -355,7 +365,9 @@ void FullscreenControllerStateTest::VerifyWindowState() {
break;
case STATE_BROWSER_FULLSCREEN_NO_CHROME:
#if defined(OS_MACOSX)
- EXPECT_FALSE(GetBrowser()->window()->InPresentationMode())
+ EXPECT_FALSE(GetBrowser()->window()->IsFullscreenWithChrome())
+ << GetAndClearDebugLog();
+ EXPECT_TRUE(GetBrowser()->window()->IsFullscreenWithoutChrome())
<< GetAndClearDebugLog();
#endif
EXPECT_TRUE(GetFullscreenController()->IsFullscreenForBrowser())
@@ -367,7 +379,9 @@ void FullscreenControllerStateTest::VerifyWindowState() {
break;
#if defined(OS_WIN)
case STATE_METRO_SNAP:
- // No expectation for InPresentationMode.
+ // http://crbug.com/169138
+ // No expectation for IsFullscreenWithChrome() or
+ // IsFullscreenWithoutChrome()
// TODO(scheib) IsFullscreenForBrowser and IsFullscreenForTabOrPending
// are returning true and false in interactive tests with real window.
@@ -382,7 +396,9 @@ void FullscreenControllerStateTest::VerifyWindowState() {
#endif
case STATE_TAB_FULLSCREEN:
#if defined(OS_MACOSX)
- EXPECT_TRUE(GetBrowser()->window()->InPresentationMode())
+ EXPECT_FALSE(GetBrowser()->window()->IsFullscreenWithChrome())
+ << GetAndClearDebugLog();
+ EXPECT_TRUE(GetBrowser()->window()->IsFullscreenWithoutChrome())
<< GetAndClearDebugLog();
#endif
EXPECT_FALSE(GetFullscreenController()->IsFullscreenForBrowser())
@@ -394,7 +410,9 @@ void FullscreenControllerStateTest::VerifyWindowState() {
break;
case STATE_TAB_BROWSER_FULLSCREEN:
#if defined(OS_MACOSX)
- EXPECT_FALSE(GetBrowser()->window()->InPresentationMode())
+ EXPECT_FALSE(GetBrowser()->window()->IsFullscreenWithChrome())
+ << GetAndClearDebugLog();
+ EXPECT_TRUE(GetBrowser()->window()->IsFullscreenWithoutChrome())
<< GetAndClearDebugLog();
#endif
EXPECT_TRUE(GetFullscreenController()->IsFullscreenForBrowser())
@@ -406,7 +424,9 @@ void FullscreenControllerStateTest::VerifyWindowState() {
break;
case STATE_TO_NORMAL:
#if defined(OS_MACOSX)
- EXPECT_FALSE(GetBrowser()->window()->InPresentationMode())
+ EXPECT_FALSE(GetBrowser()->window()->IsFullscreenWithChrome())
+ << GetAndClearDebugLog();
+ EXPECT_FALSE(GetBrowser()->window()->IsFullscreenWithoutChrome())
<< GetAndClearDebugLog();
#endif
// No expectation for IsFullscreenForBrowser.
@@ -416,7 +436,9 @@ void FullscreenControllerStateTest::VerifyWindowState() {
break;
case STATE_TO_BROWSER_FULLSCREEN_NO_CHROME:
#if defined(OS_MACOSX)
- EXPECT_FALSE(GetBrowser()->window()->InPresentationMode())
+ EXPECT_FALSE(GetBrowser()->window()->IsFullscreenWithChrome())
+ << GetAndClearDebugLog();
+ EXPECT_TRUE(GetBrowser()->window()->IsFullscreenWithoutChrome())
<< GetAndClearDebugLog();
EXPECT_TRUE(GetFullscreenController()->IsFullscreenForBrowser())
<< GetAndClearDebugLog();

Powered by Google App Engine
This is Rietveld 408576698