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

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

Issue 1779693002: [merge] CrOS: Don't paint tab-loading spinners in layers while in immersive fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
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 856e8dec24968078a7288d3e844b019fa26ca977..aaa8cdd6ecd74877975c894593813b03583e4f82 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
@@ -263,6 +263,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