OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_view.h" | 5 #include "ash/shelf/shelf_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 class ShelfViewTest : public AshTestBase { | 289 class ShelfViewTest : public AshTestBase { |
290 public: | 290 public: |
291 ShelfViewTest() | 291 ShelfViewTest() |
292 : model_(NULL), | 292 : model_(NULL), |
293 shelf_view_(NULL), | 293 shelf_view_(NULL), |
294 browser_index_(1), | 294 browser_index_(1), |
295 item_manager_(NULL) {} | 295 item_manager_(NULL) {} |
296 virtual ~ShelfViewTest() {} | 296 virtual ~ShelfViewTest() {} |
297 | 297 |
298 virtual void SetUp() override { | 298 virtual void SetUp() override { |
299 CommandLine::ForCurrentProcess()->AppendSwitch( | 299 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
300 switches::kEnableTouchFeedback); | 300 switches::kEnableTouchFeedback); |
301 AshTestBase::SetUp(); | 301 AshTestBase::SetUp(); |
302 test::ShellTestApi test_api(Shell::GetInstance()); | 302 test::ShellTestApi test_api(Shell::GetInstance()); |
303 model_ = test_api.shelf_model(); | 303 model_ = test_api.shelf_model(); |
304 Shelf* shelf = Shelf::ForPrimaryDisplay(); | 304 Shelf* shelf = Shelf::ForPrimaryDisplay(); |
305 shelf_view_ = ShelfTestAPI(shelf).shelf_view(); | 305 shelf_view_ = ShelfTestAPI(shelf).shelf_view(); |
306 | 306 |
307 // The bounds should be big enough for 4 buttons + overflow chevron. | 307 // The bounds should be big enough for 4 buttons + overflow chevron. |
308 shelf_view_->SetBounds(0, 0, 500, kShelfSize); | 308 shelf_view_->SetBounds(0, 0, 500, kShelfSize); |
309 | 309 |
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1763 test_api_->RunMessageLoopUntilAnimationsDone(); | 1763 test_api_->RunMessageLoopUntilAnimationsDone(); |
1764 CheckAllItemsAreInBounds(); | 1764 CheckAllItemsAreInBounds(); |
1765 } | 1765 } |
1766 | 1766 |
1767 INSTANTIATE_TEST_CASE_P(LtrRtl, ShelfViewTextDirectionTest, testing::Bool()); | 1767 INSTANTIATE_TEST_CASE_P(LtrRtl, ShelfViewTextDirectionTest, testing::Bool()); |
1768 INSTANTIATE_TEST_CASE_P(VisibleBounds, ShelfViewVisibleBoundsTest, | 1768 INSTANTIATE_TEST_CASE_P(VisibleBounds, ShelfViewVisibleBoundsTest, |
1769 testing::Bool()); | 1769 testing::Bool()); |
1770 | 1770 |
1771 } // namespace test | 1771 } // namespace test |
1772 } // namespace ash | 1772 } // namespace ash |
OLD | NEW |