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

Unified Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 13994014: Force refresh of shelf area when gesture completes to prevent (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: added test Created 7 years, 8 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_layout_manager.cc ('k') | ash/shelf/shelf_widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager_unittest.cc
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
index 30c9220e9cbd06f200fd5e17bb0322565a1165e1..843c1dc1e93e951de16642a718728a284cb854c9 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -99,6 +99,11 @@ class ShelfDragCallback {
EXPECT_EQ(not_visible_bounds_.bottom(), shelf_bounds.bottom());
EXPECT_EQ(visible_bounds_.bottom(), shelf_bounds.bottom());
+ // if the shelf is being dimmed test dimmer bounds as well.
+ if (GetShelfWidget()->GetDimsShelf())
+ EXPECT_EQ(GetShelfWidget()->GetWindowBoundsInScreen(),
+ GetShelfWidget()->GetDimmerBoundsForTest());
+
// The shelf should never be smaller than the hidden state.
EXPECT_GE(shelf_bounds.height(), not_visible_bounds_.height());
@@ -996,6 +1001,8 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_GestureDrag) {
EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state());
EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_NEVER, shelf->auto_hide_behavior());
EXPECT_EQ(bounds_shelf.ToString(), window->bounds().ToString());
+ EXPECT_EQ(GetShelfWidget()->GetDimmerBoundsForTest(),
+ GetShelfWidget()->GetWindowBoundsInScreen());
EXPECT_EQ(shelf_shown.ToString(),
GetShelfWidget()->GetWindowBoundsInScreen().ToString());
@@ -1039,6 +1046,7 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_GestureDrag) {
EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state());
EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
EXPECT_EQ(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS, shelf->auto_hide_behavior());
+ EXPECT_EQ(GetShelfWidget()->GetDimmerBoundsForTest(), gfx::Rect());
EXPECT_EQ(bounds_noshelf.ToString(), window->bounds().ToString());
EXPECT_EQ(shelf_hidden.ToString(),
GetShelfWidget()->GetWindowBoundsInScreen().ToString());
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shelf/shelf_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698