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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc

Issue 2690443002: cros-md: Remove the non-MD immersive mode code paths (Closed)
Patch Set: rebase & code comments Created 3 years, 10 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/views/frame/browser_non_client_frame_view_ash_browsertest.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
index 778e5e8f43a900b6d0c2653d53fbaafb6a9bfade..931f739ea4a987e8e28d5cbdaafd0387c27344da 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
@@ -10,30 +10,27 @@
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm_shell.h"
#include "ash/shell.h"
+#include "ash/test/immersive_fullscreen_controller_test_api.h"
#include "base/command_line.h"
#include "build/build_config.h"
+#include "chrome/browser/profiles/profile_avatar_icon_util.h"
+#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
+#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_test.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
#include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
+#include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h"
+#include "chrome/browser/ui/views/profiles/profile_indicator_icon.h"
#include "chrome/browser/ui/views/tabs/tab.h"
#include "chrome/test/base/in_process_browser_test.h"
+#include "components/signin/core/account_id/account_id.h"
#include "ui/base/hit_test.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/views/widget/widget.h"
-#if defined(OS_CHROMEOS)
-#include "ash/test/immersive_fullscreen_controller_test_api.h"
-#include "chrome/browser/profiles/profile_avatar_icon_util.h"
-#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
-#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_test.h"
-#include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h"
-#include "chrome/browser/ui/views/profiles/profile_indicator_icon.h"
-#include "components/signin/core/account_id/account_id.h"
-#endif // defined(OS_CHROMEOS)
-
using views::Widget;
typedef InProcessBrowserTest BrowserNonClientFrameViewAshTest;
@@ -108,7 +105,6 @@ IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest,
EXPECT_TRUE(frame_view->caption_button_container_->visible());
}
-#if defined(OS_CHROMEOS)
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) {
BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser());
content::WebContents* web_contents = browser_view->GetActiveWebContents();
@@ -134,8 +130,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) {
// Frame paints by default.
EXPECT_TRUE(frame_view->ShouldPaint());
- EXPECT_LT(Tab::GetImmersiveHeight(),
- frame_view->header_painter_->GetHeaderHeightForPainting());
+ EXPECT_LT(0, frame_view->header_painter_->GetHeaderHeightForPainting());
// Enter both browser fullscreen and tab fullscreen. Entering browser
// fullscreen should enable immersive fullscreen.
@@ -164,17 +159,15 @@ IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) {
EXPECT_TRUE(immersive_mode_controller->IsRevealed());
EXPECT_TRUE(frame_view->ShouldPaint());
EXPECT_TRUE(frame_view->caption_button_container_->visible());
- EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle());
// End the reveal. When in both immersive browser fullscreen and tab
- // fullscreen, the tab lightbars should not be painted.
+ // fullscreen.
revealed_lock.reset();
EXPECT_FALSE(immersive_mode_controller->IsRevealed());
EXPECT_FALSE(frame_view->ShouldPaint());
EXPECT_EQ(0, frame_view->header_painter_->GetHeaderHeightForPainting());
- // Repeat test but without tab fullscreen. The tab lightbars should now show
- // when the top-of-window views are not revealed.
+ // Repeat test but without tab fullscreen.
{
std::unique_ptr<FullscreenNotificationObserver> waiter(
new FullscreenNotificationObserver());
@@ -191,15 +184,12 @@ IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) {
EXPECT_TRUE(immersive_mode_controller->IsRevealed());
EXPECT_TRUE(frame_view->ShouldPaint());
EXPECT_TRUE(frame_view->caption_button_container_->visible());
- EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle());
- EXPECT_LT(Tab::GetImmersiveHeight(),
- frame_view->header_painter_->GetHeaderHeightForPainting());
+ EXPECT_LT(0, frame_view->header_painter_->GetHeaderHeightForPainting());
// Ending the reveal. Immersive browser should have the same behavior as full
- // screen, i.e., no light bar and having an origin of (0,0).
+ // screen, i.e., having an origin of (0,0).
revealed_lock.reset();
EXPECT_FALSE(frame_view->ShouldPaint());
- EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle());
EXPECT_EQ(0, frame_view->header_painter_->GetHeaderHeightForPainting());
// Exiting immersive fullscreen should make the caption buttons and the frame
@@ -213,9 +203,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) {
EXPECT_FALSE(immersive_mode_controller->IsEnabled());
EXPECT_TRUE(frame_view->ShouldPaint());
EXPECT_TRUE(frame_view->caption_button_container_->visible());
- EXPECT_FALSE(frame_view->UseImmersiveLightbarHeaderStyle());
- EXPECT_LT(Tab::GetImmersiveHeight(),
- frame_view->header_painter_->GetHeaderHeightForPainting());
+ EXPECT_LT(0, frame_view->header_painter_->GetHeaderHeightForPainting());
}
// Tests that Avatar icon should show on the top left corner of the teleported
@@ -275,8 +263,6 @@ IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest,
EXPECT_EQ(HTCAPTION, frame_view->NonClientHitTest(avatar_center));
}
-#endif // defined(OS_CHROMEOS)
-
// Tests that FrameCaptionButtonContainer has been relaid out in response to
// maximize mode being toggled.
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewAshTest,

Powered by Google App Engine
This is Rietveld 408576698