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

Unified Diff: ash/shelf/shelf_view_unittest.cc

Issue 2867413002: [ash-md] Updated the overflow shelf to change colors based on the wallpaper. (Closed)
Patch Set: Added ShelfViewTest.OverflowShelfColorIsDerivedFromWallpaper test. Created 3 years, 7 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 | « ash/shelf/shelf_background_animator_unittest.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view_unittest.cc
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
index 1d969cabbe815ceddc3f6a14f92b2d8bfbd2e6a5..1ea3a3f8e032d009ba77bf9f897b8c557f4ca140 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -35,6 +35,8 @@
#include "ash/test/shell_test_api.h"
#include "ash/test/test_shell_delegate.h"
#include "ash/test/test_system_tray_delegate.h"
+#include "ash/test/wallpaper_controller_test_api.h"
+#include "ash/wallpaper/wallpaper_controller.h"
#include "ash/wm_window.h"
#include "base/i18n/rtl.h"
#include "base/macros.h"
@@ -1580,6 +1582,19 @@ TEST_F(ShelfViewTest, OverflowBubbleSize) {
test_for_overflow_view.GetPreferredSize().width());
}
+TEST_F(ShelfViewTest, OverflowShelfColorIsDerivedFromWallpaper) {
+ test::WallpaperControllerTestApi wallpaper_test_api(
+ Shell::Get()->wallpaper_controller());
+ const SkColor opaque_expected_color =
+ wallpaper_test_api.ApplyColorProducingWallpaper();
+
+ AddButtonsUntilOverflow();
+ test_api_->ShowOverflowBubble();
+ OverflowBubbleView* bubble_view = test_api_->overflow_bubble()->bubble_view();
+
+ EXPECT_EQ(opaque_expected_color, SkColorSetA(bubble_view->color(), 255));
+}
+
// Check the drag insertion bounds of scrolled overflow bubble.
TEST_F(ShelfViewTest, CheckDragInsertBoundsOfScrolledOverflowBubble) {
UpdateDisplay("400x300");
« no previous file with comments | « ash/shelf/shelf_background_animator_unittest.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698