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

Unified Diff: ash/shelf/shelf_view_unittest.cc

Issue 1742953002: Simplify ash shelf layout code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore ConvertRectToScreen calls. Created 4 years, 10 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_view.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 d5e108d2e120475d079191f2e6c0256b6978e55c..b79022363e08f2e868cd060451ac4000105a6502 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -225,11 +225,10 @@ TEST_F(ShelfViewIconObserverTest, MAYBE_AddRemoveWithMultipleDisplays) {
TEST_F(ShelfViewIconObserverTest, BoundsChanged) {
ShelfWidget* widget = Shell::GetPrimaryRootWindowController()->shelf();
- Shelf* shelf = Shelf::ForPrimaryDisplay();
- gfx::Size shelf_size = widget->GetWindowBoundsInScreen().size();
- shelf_size.set_width(shelf_size.width() / 2);
- ASSERT_GT(shelf_size.width(), 0);
- shelf->SetShelfViewBounds(gfx::Rect(shelf_size));
+ gfx::Rect shelf_bounds = widget->GetWindowBoundsInScreen();
+ shelf_bounds.set_width(shelf_bounds.width() / 2);
+ ASSERT_GT(shelf_bounds.width(), 0);
+ widget->SetBounds(shelf_bounds);
// No animation happens for ShelfView bounds change.
EXPECT_TRUE(observer()->change_notified());
observer()->Reset();
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | ash/shelf/shelf_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698