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

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..7b11cebfd4cd4bfb533bf9b6d58076264d9f2200 100644
--- a/chrome/browser/ui/fullscreen/fullscreen_controller_state_test.cc
+++ b/chrome/browser/ui/fullscreen/fullscreen_controller_state_test.cc
@@ -343,7 +343,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 +357,13 @@ void FullscreenControllerStateTest::VerifyWindowState() {
break;
case STATE_BROWSER_FULLSCREEN_NO_CHROME:
#if defined(OS_MACOSX)
- EXPECT_FALSE(GetBrowser()->window()->InPresentationMode())
+ // http://crbug.com/169138 - Fullscreen controller currently transitions
+ // Mac into fullscreen with and without chrome differently than other
+ // platforms, and the result is a name mismatch between the named
+ // state_ and the window()->IsFullscreenWith...() methods.
+ EXPECT_TRUE(GetBrowser()->window()->IsFullscreenWithChrome())
+ << GetAndClearDebugLog();
+ EXPECT_FALSE(GetBrowser()->window()->IsFullscreenWithoutChrome())
<< GetAndClearDebugLog();
#endif
EXPECT_TRUE(GetFullscreenController()->IsFullscreenForBrowser())
@@ -367,7 +375,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 +392,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 +406,9 @@ void FullscreenControllerStateTest::VerifyWindowState() {
break;
case STATE_TAB_BROWSER_FULLSCREEN:
#if defined(OS_MACOSX)
- EXPECT_FALSE(GetBrowser()->window()->InPresentationMode())
+ EXPECT_TRUE(GetBrowser()->window()->IsFullscreenWithChrome())
+ << GetAndClearDebugLog();
+ EXPECT_FALSE(GetBrowser()->window()->IsFullscreenWithoutChrome())
<< GetAndClearDebugLog();
#endif
EXPECT_TRUE(GetFullscreenController()->IsFullscreenForBrowser())
@@ -406,7 +420,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 +432,13 @@ void FullscreenControllerStateTest::VerifyWindowState() {
break;
case STATE_TO_BROWSER_FULLSCREEN_NO_CHROME:
#if defined(OS_MACOSX)
- EXPECT_FALSE(GetBrowser()->window()->InPresentationMode())
+ // http://crbug.com/169138 - Fullscreen controller currently transitions
+ // Mac into fullscreen with and without chrome differently than other
+ // platforms, and the result is a name mismatch between the named
+ // state_ and the window()->IsFullscreenWith...() methods.
+ EXPECT_TRUE(GetBrowser()->window()->IsFullscreenWithChrome())
+ << GetAndClearDebugLog();
+ EXPECT_FALSE(GetBrowser()->window()->IsFullscreenWithoutChrome())
<< GetAndClearDebugLog();
EXPECT_TRUE(GetFullscreenController()->IsFullscreenForBrowser())
<< GetAndClearDebugLog();

Powered by Google App Engine
This is Rietveld 408576698