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_resizer.h" | 5 #include "ash/wm/dock/docked_window_resizer.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_util.h" | 9 #include "ash/screen_util.h" |
10 #include "ash/shelf/shelf.h" | 10 #include "ash/shelf/shelf.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 namespace ash { | 39 namespace ash { |
40 | 40 |
41 class DockedWindowResizerTest | 41 class DockedWindowResizerTest |
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 DockedWindowResizerTest() : model_(NULL), window_type_(GetParam()) {} | 45 DockedWindowResizerTest() : model_(NULL), window_type_(GetParam()) {} |
46 virtual ~DockedWindowResizerTest() {} | 46 virtual ~DockedWindowResizerTest() {} |
47 | 47 |
48 virtual void SetUp() override { | 48 void SetUp() override { |
49 AshTestBase::SetUp(); | 49 AshTestBase::SetUp(); |
50 UpdateDisplay("600x400"); | 50 UpdateDisplay("600x400"); |
51 test::ShellTestApi test_api(Shell::GetInstance()); | 51 test::ShellTestApi test_api(Shell::GetInstance()); |
52 model_ = test_api.shelf_model(); | 52 model_ = test_api.shelf_model(); |
53 } | 53 } |
54 | 54 |
55 virtual void TearDown() override { | 55 void TearDown() override { AshTestBase::TearDown(); } |
56 AshTestBase::TearDown(); | |
57 } | |
58 | 56 |
59 protected: | 57 protected: |
60 enum DockedEdge { | 58 enum DockedEdge { |
61 DOCKED_EDGE_NONE, | 59 DOCKED_EDGE_NONE, |
62 DOCKED_EDGE_LEFT, | 60 DOCKED_EDGE_LEFT, |
63 DOCKED_EDGE_RIGHT, | 61 DOCKED_EDGE_RIGHT, |
64 }; | 62 }; |
65 | 63 |
66 int ideal_width() const { return DockedWindowLayoutManager::kIdealWidth; } | 64 int ideal_width() const { return DockedWindowLayoutManager::kIdealWidth; } |
67 int min_dock_gap() const { return DockedWindowLayoutManager::kMinDockGap; } | 65 int min_dock_gap() const { return DockedWindowLayoutManager::kMinDockGap; } |
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1604 EXPECT_TRUE(window_state->IsMaximized()); | 1602 EXPECT_TRUE(window_state->IsMaximized()); |
1605 } | 1603 } |
1606 | 1604 |
1607 // Tests run twice - on both panels and normal windows | 1605 // Tests run twice - on both panels and normal windows |
1608 INSTANTIATE_TEST_CASE_P(NormalOrPanel, | 1606 INSTANTIATE_TEST_CASE_P(NormalOrPanel, |
1609 DockedWindowResizerTest, | 1607 DockedWindowResizerTest, |
1610 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, | 1608 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, |
1611 ui::wm::WINDOW_TYPE_PANEL)); | 1609 ui::wm::WINDOW_TYPE_PANEL)); |
1612 | 1610 |
1613 } // namespace ash | 1611 } // namespace ash |
OLD | NEW |