| 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" |
| 11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 12 #include "ash/test/ash_test_base.h" | 12 #include "ash/test/ash_test_base.h" |
| 13 #include "ash/test/shelf_test_api.h" | 13 #include "ash/test/shelf_test_api.h" |
| 14 #include "ash/test/shelf_view_test_api.h" | 14 #include "ash/test/shelf_view_test_api.h" |
| 15 #include "ash/test/test_shelf_item_delegate.h" | 15 #include "ash/test/test_shelf_item_delegate.h" |
| 16 #include "ash/wm/window_util.h" | 16 #include "ash/wm/window_util.h" |
| 17 #include "ui/aura/window_event_dispatcher.h" | 17 #include "ui/aura/window_event_dispatcher.h" |
| 18 #include "ui/gfx/display.h" | 18 #include "ui/gfx/display.h" |
| 19 #include "ui/gfx/screen.h" | 19 #include "ui/gfx/screen.h" |
| 20 #include "ui/views/view.h" | 20 #include "ui/views/view.h" |
| 21 #include "ui/views/widget/widget.h" | 21 #include "ui/views/widget/widget.h" |
| 22 | 22 |
| 23 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
| 24 #include "base/win/windows_version.h" | 24 #include "base/win/windows_version.h" |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 using ash::internal::ShelfView; | 27 using ash::ShelfView; |
| 28 using ash::internal::ShelfButton; | 28 using ash::ShelfButton; |
| 29 | 29 |
| 30 namespace ash { | 30 namespace ash { |
| 31 | 31 |
| 32 class ShelfTest : public ash::test::AshTestBase { | 32 class ShelfTest : public ash::test::AshTestBase { |
| 33 public: | 33 public: |
| 34 ShelfTest() | 34 ShelfTest() |
| 35 : shelf_(NULL), | 35 : shelf_(NULL), |
| 36 shelf_view_(NULL), | 36 shelf_view_(NULL), |
| 37 shelf_model_(NULL), | 37 shelf_model_(NULL), |
| 38 item_delegate_manager_(NULL) {} | 38 item_delegate_manager_(NULL) {} |
| (...skipping 116 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 |