Commit 96fb2db7 authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

OopAsh: Begin enabling browser frame browser_tests

Bug: 854704
Change-Id: I00c25bee75cb69d36af1ab022847cf08100f5e88
Reviewed-on: https://chromium-review.googlesource.com/1144640Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577204}
parent b2290f98
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
#include "chrome/browser/ui/views/page_action/page_action_icon_container_view.h" #include "chrome/browser/ui/views/page_action/page_action_icon_container_view.h"
#include "chrome/browser/ui/views/profiles/profile_indicator_icon.h" #include "chrome/browser/ui/views/profiles/profile_indicator_icon.h"
#include "chrome/browser/ui/views/tabs/tab.h" #include "chrome/browser/ui/views/tabs/tab.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "chrome/browser/ui/views/toolbar/app_menu.h" #include "chrome/browser/ui/views/toolbar/app_menu.h"
#include "chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h" #include "chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h"
#include "chrome/common/chrome_features.h" #include "chrome/common/chrome_features.h"
...@@ -223,7 +224,6 @@ IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest, ...@@ -223,7 +224,6 @@ IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest,
// buttons should be visible. // buttons should be visible.
ToggleFullscreenModeAndWait(browser()); ToggleFullscreenModeAndWait(browser());
EXPECT_TRUE(frame_view->ShouldPaint()); EXPECT_TRUE(frame_view->ShouldPaint());
EXPECT_TRUE(frame_view->caption_button_container_->visible());
} }
IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) { IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) {
...@@ -248,7 +248,8 @@ IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) { ...@@ -248,7 +248,8 @@ IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) {
// Frame paints by default. // Frame paints by default.
EXPECT_TRUE(frame_view->ShouldPaint()); EXPECT_TRUE(frame_view->ShouldPaint());
EXPECT_LT(0, frame_view->frame_header_->GetHeaderHeightForPainting()); EXPECT_LT(
0, frame_view->GetBoundsForTabStrip(browser_view->tabstrip()).bottom());
// Enter both browser fullscreen and tab fullscreen. Entering browser // Enter both browser fullscreen and tab fullscreen. Entering browser
// fullscreen should enable immersive fullscreen. // fullscreen should enable immersive fullscreen.
...@@ -262,14 +263,14 @@ IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) { ...@@ -262,14 +263,14 @@ IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) {
ImmersiveModeController::ANIMATE_REVEAL_NO)); ImmersiveModeController::ANIMATE_REVEAL_NO));
EXPECT_TRUE(immersive_mode_controller->IsRevealed()); EXPECT_TRUE(immersive_mode_controller->IsRevealed());
EXPECT_TRUE(frame_view->ShouldPaint()); EXPECT_TRUE(frame_view->ShouldPaint());
EXPECT_TRUE(frame_view->caption_button_container_->visible());
// End the reveal. When in both immersive browser fullscreen and tab // End the reveal. When in both immersive browser fullscreen and tab
// fullscreen. // fullscreen.
revealed_lock.reset(); revealed_lock.reset();
EXPECT_FALSE(immersive_mode_controller->IsRevealed()); EXPECT_FALSE(immersive_mode_controller->IsRevealed());
EXPECT_FALSE(frame_view->ShouldPaint()); EXPECT_FALSE(frame_view->ShouldPaint());
EXPECT_EQ(0, frame_view->frame_header_->GetHeaderHeightForPainting()); EXPECT_EQ(
0, frame_view->GetBoundsForTabStrip(browser_view->tabstrip()).bottom());
// Repeat test but without tab fullscreen. // Repeat test but without tab fullscreen.
ExitFullscreenModeForTabAndWait(browser(), web_contents); ExitFullscreenModeForTabAndWait(browser(), web_contents);
...@@ -279,22 +280,23 @@ IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) { ...@@ -279,22 +280,23 @@ IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest, ImmersiveFullscreen) {
ImmersiveModeController::ANIMATE_REVEAL_NO)); ImmersiveModeController::ANIMATE_REVEAL_NO));
EXPECT_TRUE(immersive_mode_controller->IsRevealed()); EXPECT_TRUE(immersive_mode_controller->IsRevealed());
EXPECT_TRUE(frame_view->ShouldPaint()); EXPECT_TRUE(frame_view->ShouldPaint());
EXPECT_TRUE(frame_view->caption_button_container_->visible()); EXPECT_LT(
EXPECT_LT(0, frame_view->frame_header_->GetHeaderHeightForPainting()); 0, frame_view->GetBoundsForTabStrip(browser_view->tabstrip()).bottom());
// Ending the reveal. Immersive browser should have the same behavior as full // Ending the reveal. Immersive browser should have the same behavior as full
// screen, i.e., having an origin of (0,0). // screen, i.e., having an origin of (0,0).
revealed_lock.reset(); revealed_lock.reset();
EXPECT_FALSE(frame_view->ShouldPaint()); EXPECT_FALSE(frame_view->ShouldPaint());
EXPECT_EQ(0, frame_view->frame_header_->GetHeaderHeightForPainting()); EXPECT_EQ(
0, frame_view->GetBoundsForTabStrip(browser_view->tabstrip()).bottom());
// Exiting immersive fullscreen should make the caption buttons and the frame // Exiting immersive fullscreen should make the caption buttons and the frame
// visible again. // visible again.
ExitFullscreenModeAndWait(browser_view); ExitFullscreenModeAndWait(browser_view);
EXPECT_FALSE(immersive_mode_controller->IsEnabled()); EXPECT_FALSE(immersive_mode_controller->IsEnabled());
EXPECT_TRUE(frame_view->ShouldPaint()); EXPECT_TRUE(frame_view->ShouldPaint());
EXPECT_TRUE(frame_view->caption_button_container_->visible()); EXPECT_LT(
EXPECT_LT(0, frame_view->frame_header_->GetHeaderHeightForPainting()); 0, frame_view->GetBoundsForTabStrip(browser_view->tabstrip()).bottom());
} }
// Tests that Avatar icon should show on the top left corner of the teleported // Tests that Avatar icon should show on the top left corner of the teleported
...@@ -385,6 +387,8 @@ IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest, ...@@ -385,6 +387,8 @@ IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest,
// Tests that FrameCaptionButtonContainer has been relaid out in response to // Tests that FrameCaptionButtonContainer has been relaid out in response to
// tablet mode being toggled. // tablet mode being toggled.
// TODO(estade): Implement this behavior in OopAsh (test by checking the
// window's caption button bounds).
IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest, IN_PROC_BROWSER_TEST_P(BrowserNonClientFrameViewAshTest,
ToggleTabletModeRelayout) { ToggleTabletModeRelayout) {
BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser()); BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser());
......
...@@ -31,17 +31,23 @@ ...@@ -31,17 +31,23 @@
-AutomationApiTestWithDeviceScaleFactor.* -AutomationApiTestWithDeviceScaleFactor.*
-AutomationManagerAuraBrowserTest.* -AutomationManagerAuraBrowserTest.*
# Direct access to ash window frames, tablet mode, overview mode, etc. # The browser frame is a work in progress.
-BrowserNonClientFrameViewAshBackButtonTest.* -BrowserNonClientFrameViewAshBackButtonTest.*
-BrowserNonClientFrameViewAshTest.* -BrowserNonClientFrameViewAshTest.*
# Individual tests that work.
BrowserNonClientFrameViewAshTest.NonImmersiveFullscreen*
BrowserNonClientFrameViewAshTest.ImmersiveFullscreen*
BrowserNonClientFrameViewAshTest.FrameMinSizeIsUpdated*
# Direct access to ash window frames, tablet mode, overview mode, etc.
-ExtensionUninstallDialogViewBrowserTest.BookmarkAppWindowAshCrash -ExtensionUninstallDialogViewBrowserTest.BookmarkAppWindowAshCrash
-HostedAppNonClientFrameViewAshTest.* -HostedAppNonClientFrameViewAshTest.*
-ImmersiveModeControllerAshHostedAppBrowserTest.*
-HomeLauncherBrowserNonClientFrameViewAshTest.* -HomeLauncherBrowserNonClientFrameViewAshTest.*
# Fix immersive fullscreen mode in mash. https://crbug.com/844748. # Fix immersive fullscreen mode in mash. https://crbug.com/844748.
-ImmersiveModeBrowserViewTest.TestCaptionButtonsReceiveEventsInAppImmersiveMode* -ImmersiveModeBrowserViewTest.TestCaptionButtonsReceiveEventsInAppImmersiveMode*
-ImmersiveModeBrowserViewTest.TestCaptionButtonsReceiveEventsInBrowserImmersiveMode* -ImmersiveModeBrowserViewTest.TestCaptionButtonsReceiveEventsInBrowserImmersiveMode*
-ImmersiveModeControllerAshHostedAppBrowserTest.*
-FileDisplay/FilesAppBrowserTest.Test/fileDisplayDownloads_TabletMode -FileDisplay/FilesAppBrowserTest.Test/fileDisplayDownloads_TabletMode
-FileDisplay/FilesAppBrowserTest.Test/fileDisplayDrive_TabletMode -FileDisplay/FilesAppBrowserTest.Test/fileDisplayDrive_TabletMode
-QuickView/FilesAppBrowserTest.Test/openQuickView_TabletMode -QuickView/FilesAppBrowserTest.Test/openQuickView_TabletMode
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment