OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/wm/dock/docked_window_layout_manager.h" | 5 #include "ash/wm/dock/docked_window_layout_manager.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
10 #include "ash/shelf/shelf.h" | 10 #include "ash/shelf/shelf.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 namespace internal { | 39 namespace internal { |
40 | 40 |
41 class DockedWindowLayoutManagerTest | 41 class DockedWindowLayoutManagerTest |
42 : public test::AshTestBase, | 42 : public test::AshTestBase, |
43 public testing::WithParamInterface<ui::wm::WindowType> { | 43 public testing::WithParamInterface<ui::wm::WindowType> { |
44 public: | 44 public: |
45 DockedWindowLayoutManagerTest() : window_type_(GetParam()) {} | 45 DockedWindowLayoutManagerTest() : window_type_(GetParam()) {} |
46 virtual ~DockedWindowLayoutManagerTest() {} | 46 virtual ~DockedWindowLayoutManagerTest() {} |
47 | 47 |
48 virtual void SetUp() OVERRIDE { | 48 virtual void SetUp() OVERRIDE { |
49 CommandLine::ForCurrentProcess()->AppendSwitch( | |
50 ash::switches::kAshEnableDockedWindows); | |
51 AshTestBase::SetUp(); | 49 AshTestBase::SetUp(); |
52 UpdateDisplay("600x600"); | 50 UpdateDisplay("600x600"); |
53 ASSERT_TRUE(test::TestShelfDelegate::instance()); | 51 ASSERT_TRUE(test::TestShelfDelegate::instance()); |
54 | 52 |
55 shelf_view_test_.reset(new test::ShelfViewTestAPI( | 53 shelf_view_test_.reset(new test::ShelfViewTestAPI( |
56 test::ShelfTestAPI(Shelf::ForPrimaryDisplay()).shelf_view())); | 54 test::ShelfTestAPI(Shelf::ForPrimaryDisplay()).shelf_view())); |
57 shelf_view_test_->SetAnimationDuration(1); | 55 shelf_view_test_->SetAnimationDuration(1); |
58 } | 56 } |
59 | 57 |
60 protected: | 58 protected: |
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 EXPECT_LT(w2->GetBoundsInScreen().height(), work_area.height() / 2 - 10); | 806 EXPECT_LT(w2->GetBoundsInScreen().height(), work_area.height() / 2 - 10); |
809 } | 807 } |
810 | 808 |
811 // Tests run twice - on both panels and normal windows | 809 // Tests run twice - on both panels and normal windows |
812 INSTANTIATE_TEST_CASE_P(NormalOrPanel, | 810 INSTANTIATE_TEST_CASE_P(NormalOrPanel, |
813 DockedWindowLayoutManagerTest, | 811 DockedWindowLayoutManagerTest, |
814 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, | 812 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, |
815 ui::wm::WINDOW_TYPE_PANEL)); | 813 ui::wm::WINDOW_TYPE_PANEL)); |
816 } // namespace internal | 814 } // namespace internal |
817 } // namespace ash | 815 } // namespace ash |
OLD | NEW |