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

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

Issue 1775933004: [merge-m49] CrOS: Don't paint tab-loading spinners in layers while in immersive fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc b/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
index f33ec1b66f9ef12d1a4edb79bade743563fb16e1..367b42cc3307c0aa4975c42e1e4bf7f72c525c17 100644
--- a/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
+++ b/chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc
@@ -272,6 +272,28 @@ TEST_F(ImmersiveModeControllerAshTest, TabAndBrowserFullscreen) {
EXPECT_TRUE(controller()->ShouldHideTabIndicators());
}
+// Ensure the circular tab-loading throbbers are not painted as layers in
+// immersive fullscreen, since the tab strip may animate in or out without
+// moving the layers.
+TEST_F(ImmersiveModeControllerAshTest, LayeredSpinners) {
+ AddTab(browser(), GURL("about:blank"));
+
+ TabStrip* tabstrip = browser_view()->tabstrip();
+
+ // Immersive fullscreen starts out disabled; layers are OK.
+ EXPECT_FALSE(browser_view()->GetWidget()->IsFullscreen());
+ EXPECT_FALSE(controller()->IsEnabled());
+ EXPECT_TRUE(tabstrip->CanPaintThrobberToLayer());
+
+ ToggleFullscreen();
+ EXPECT_TRUE(browser_view()->GetWidget()->IsFullscreen());
+ EXPECT_TRUE(controller()->IsEnabled());
+ EXPECT_FALSE(tabstrip->CanPaintThrobberToLayer());
+
+ ToggleFullscreen();
+ EXPECT_TRUE(tabstrip->CanPaintThrobberToLayer());
+}
+
class ImmersiveModeControllerAshTestHostedApp
: public ImmersiveModeControllerAshTest {
public:
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698