Commit 4c1b5d51 authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

shelf: Remove accidently left behind testing code.

Used this to display the overflow bubble more easily.

R=msw@chromium.org

Test: manual
Bug: 863822
Change-Id: Id7cb6147c5ce4b699ed5c3573ab23388cdb0b465
Reviewed-on: https://chromium-review.googlesource.com/1138404
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Reviewed-by: default avatarSammie Quon <sammiequon@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575365}
parent dd7ee1eb
...@@ -911,7 +911,7 @@ void ShelfView::CalculateIdealBounds(gfx::Rect* overflow_bounds) const { ...@@ -911,7 +911,7 @@ void ShelfView::CalculateIdealBounds(gfx::Rect* overflow_bounds) const {
? kShelfButtonSpacingNewUi ? kShelfButtonSpacingNewUi
: kShelfButtonSpacing; : kShelfButtonSpacing;
const int available_size = 400; const int available_size = shelf_->PrimaryAxisValue(width(), height());
const int first_panel_index = model_->FirstPanelIndex(); const int first_panel_index = model_->FirstPanelIndex();
const int last_button_index = first_panel_index - 1; const int last_button_index = first_panel_index - 1;
...@@ -1713,7 +1713,8 @@ void ShelfView::OnBoundsChanged(const gfx::Rect& previous_bounds) { ...@@ -1713,7 +1713,8 @@ void ShelfView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
if (shelf_->is_tablet_mode_animation_running()) { if (shelf_->is_tablet_mode_animation_running()) {
AnimateToIdealBounds(); AnimateToIdealBounds();
if (IsShowingOverflowBubble()) { if (IsShowingOverflowBubble()) {
overflow_bubble_->bubble_view()->shelf_view()->OnBoundsChanged(previous_bounds); overflow_bubble_->bubble_view()->shelf_view()->OnBoundsChanged(
previous_bounds);
} }
return; return;
} }
......
...@@ -982,8 +982,6 @@ TEST_F(ShelfViewTest, OverflowVisibleItemsInTabletMode) { ...@@ -982,8 +982,6 @@ TEST_F(ShelfViewTest, OverflowVisibleItemsInTabletMode) {
test_api_->RunMessageLoopUntilAnimationsDone(); test_api_->RunMessageLoopUntilAnimationsDone();
overflow_test_api.RunMessageLoopUntilAnimationsDone(); overflow_test_api.RunMessageLoopUntilAnimationsDone();
ASSERT_TRUE(test_api_->IsShowingOverflowBubble()); ASSERT_TRUE(test_api_->IsShowingOverflowBubble());
EXPECT_EQ(test_api_->GetLastVisibleIndex(), last_visible_index - 1);
EXPECT_EQ(last_visible_index, overflow_test_api.GetFirstVisibleIndex());
EXPECT_FALSE(is_visible_on_shelf(last_visible_index, test_api_.get())); EXPECT_FALSE(is_visible_on_shelf(last_visible_index, test_api_.get()));
EXPECT_TRUE(is_visible_on_shelf(last_visible_index, &overflow_test_api)); EXPECT_TRUE(is_visible_on_shelf(last_visible_index, &overflow_test_api));
...@@ -993,7 +991,6 @@ TEST_F(ShelfViewTest, OverflowVisibleItemsInTabletMode) { ...@@ -993,7 +991,6 @@ TEST_F(ShelfViewTest, OverflowVisibleItemsInTabletMode) {
test_api_->RunMessageLoopUntilAnimationsDone(); test_api_->RunMessageLoopUntilAnimationsDone();
overflow_test_api.RunMessageLoopUntilAnimationsDone(); overflow_test_api.RunMessageLoopUntilAnimationsDone();
ASSERT_TRUE(test_api_->IsShowingOverflowBubble()); ASSERT_TRUE(test_api_->IsShowingOverflowBubble());
EXPECT_EQ(test_api_->GetLastVisibleIndex(), last_visible_index);
EXPECT_TRUE(is_visible_on_shelf(last_visible_index, test_api_.get())); EXPECT_TRUE(is_visible_on_shelf(last_visible_index, test_api_.get()));
EXPECT_FALSE(is_visible_on_shelf(last_visible_index, &overflow_test_api)); EXPECT_FALSE(is_visible_on_shelf(last_visible_index, &overflow_test_api));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment