| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/shelf/shelf.h" | 5 #include "ash/shelf/shelf.h" |
| 6 #include "ash/shelf/shelf_button.h" | 6 #include "ash/shelf/shelf_button.h" |
| 7 #include "ash/shelf/shelf_item_delegate_manager.h" | 7 #include "ash/shelf/shelf_item_delegate_manager.h" |
| 8 #include "ash/shelf/shelf_model.h" | 8 #include "ash/shelf/shelf_model.h" |
| 9 #include "ash/shelf/shelf_view.h" | 9 #include "ash/shelf/shelf_view.h" |
| 10 #include "ash/shelf/shelf_widget.h" | 10 #include "ash/shelf/shelf_widget.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 test::ShelfTestAPI test(shelf_); | 48 test::ShelfTestAPI test(shelf_); |
| 49 shelf_view_ = test.shelf_view(); | 49 shelf_view_ = test.shelf_view(); |
| 50 shelf_model_ = shelf_view_->model(); | 50 shelf_model_ = shelf_view_->model(); |
| 51 item_delegate_manager_ = | 51 item_delegate_manager_ = |
| 52 Shell::GetInstance()->shelf_item_delegate_manager(); | 52 Shell::GetInstance()->shelf_item_delegate_manager(); |
| 53 | 53 |
| 54 test_.reset(new ash::test::ShelfViewTestAPI(shelf_view_)); | 54 test_.reset(new ash::test::ShelfViewTestAPI(shelf_view_)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 virtual void TearDown() OVERRIDE { | 57 virtual void TearDown() override { |
| 58 test::AshTestBase::TearDown(); | 58 test::AshTestBase::TearDown(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 Shelf* shelf() { | 61 Shelf* shelf() { |
| 62 return shelf_; | 62 return shelf_; |
| 63 } | 63 } |
| 64 | 64 |
| 65 ShelfView* shelf_view() { | 65 ShelfView* shelf_view() { |
| 66 return shelf_view_; | 66 return shelf_view_; |
| 67 } | 67 } |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 // Removes the first item in main shelf view. | 156 // Removes the first item in main shelf view. |
| 157 shelf_model()->RemoveItemAt(shelf_model()->ItemIndexByID(first_item_id)); | 157 shelf_model()->RemoveItemAt(shelf_model()->ItemIndexByID(first_item_id)); |
| 158 | 158 |
| 159 // Waits for all transitions to finish and there should be no crash. | 159 // Waits for all transitions to finish and there should be no crash. |
| 160 test_api()->RunMessageLoopUntilAnimationsDone(); | 160 test_api()->RunMessageLoopUntilAnimationsDone(); |
| 161 EXPECT_FALSE(shelf()->IsShowingOverflowBubble()); | 161 EXPECT_FALSE(shelf()->IsShowingOverflowBubble()); |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace ash | 164 } // namespace ash |
| OLD | NEW |