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

Unified Diff: ash/shelf/shelf_view_unittest.cc

Issue 2712293002: Remove non-MD code from ShelfButton (Closed)
Patch Set: Rebased Created 3 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
Index: ash/shelf/shelf_view_unittest.cc
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
index 896586f92d2d97613cb77dfa5a6eb6de313cdd5f..7a1a46eb76028ec3b953e8f1670eb0f14a420763 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -630,10 +630,9 @@ class ShelfViewTest : public AshTestBase {
int drop_index = 1;
gfx::Point drop_point =
test_api_->GetButton(drop_index)->GetBoundsInScreen().CenterPoint();
- int item_width = test_api_for_overflow.GetButtonSize();
// To insert at |drop_index|, more smaller x-axis value of |drop_point|
// should be used.
- gfx::Point modified_drop_point(drop_point.x() - item_width / 4,
+ gfx::Point modified_drop_point(drop_point.x() - kShelfButtonSize / 4,
drop_point.y());
generator.MoveMouseTo(modified_drop_point);
test_api_for_overflow.RunMessageLoopUntilAnimationsDone();
@@ -1596,8 +1595,7 @@ TEST_F(ShelfViewTest, OverflowBubbleSize) {
int ripped_index = test_for_overflow_view.GetLastVisibleIndex();
gfx::Size bubble_size = test_for_overflow_view.GetPreferredSize();
- int item_width = test_for_overflow_view.GetButtonSize() +
- test_for_overflow_view.GetButtonSpacing();
+ int item_width = kShelfButtonSize + kShelfButtonSpacing;
ui::test::EventGenerator& generator = GetEventGenerator();
ShelfButton* button = test_for_overflow_view.GetButton(ripped_index);
@@ -1649,7 +1647,7 @@ TEST_F(ShelfViewTest, CheckDragInsertBoundsOfScrolledOverflowBubble) {
test_api_->ShowOverflowBubble();
ASSERT_TRUE(test_api_->IsShowingOverflowBubble());
- int item_width = test_api_->GetButtonSize() + test_api_->GetButtonSpacing();
+ int item_width = kShelfButtonSize + kShelfButtonSpacing;
OverflowBubbleView* bubble_view = test_api_->overflow_bubble()->bubble_view();
OverflowBubbleViewTestAPI bubble_view_api(bubble_view);
« no previous file with comments | « ash/resources/default_200_percent/common/shelf/shelf_underline_running.png ('k') | ash/test/shelf_view_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698