Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Side by Side Diff: ash/wm/dock/docked_window_resizer_unittest.cc

Issue 2617733002: Hide docked windows behind a flag (Closed)
Patch Set: Fix tests failed because of DCHECK Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/common/wm/dock/docked_window_resizer.h" 5 #include "ash/common/wm/dock/docked_window_resizer.h"
6 6
7 #include "ash/aura/wm_window_aura.h" 7 #include "ash/aura/wm_window_aura.h"
8 #include "ash/common/ash_switches.h"
8 #include "ash/common/shelf/shelf_widget.h" 9 #include "ash/common/shelf/shelf_widget.h"
9 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
10 #include "ash/common/test/test_shelf_delegate.h" 11 #include "ash/common/test/test_shelf_delegate.h"
11 #include "ash/common/wm/dock/docked_window_layout_manager.h" 12 #include "ash/common/wm/dock/docked_window_layout_manager.h"
12 #include "ash/common/wm/panels/panel_layout_manager.h" 13 #include "ash/common/wm/panels/panel_layout_manager.h"
13 #include "ash/common/wm/window_state.h" 14 #include "ash/common/wm/window_state.h"
14 #include "ash/common/wm/wm_event.h" 15 #include "ash/common/wm/wm_event.h"
15 #include "ash/common/wm_shell.h" 16 #include "ash/common/wm_shell.h"
16 #include "ash/display/window_tree_host_manager.h" 17 #include "ash/display/window_tree_host_manager.h"
17 #include "ash/public/cpp/shelf_types.h" 18 #include "ash/public/cpp/shelf_types.h"
(...skipping 22 matching lines...) Expand all
40 namespace ash { 41 namespace ash {
41 42
42 class DockedWindowResizerTest 43 class DockedWindowResizerTest
43 : public test::AshTestBase, 44 : public test::AshTestBase,
44 public testing::WithParamInterface<ui::wm::WindowType> { 45 public testing::WithParamInterface<ui::wm::WindowType> {
45 public: 46 public:
46 DockedWindowResizerTest() : window_type_(GetParam()) {} 47 DockedWindowResizerTest() : window_type_(GetParam()) {}
47 virtual ~DockedWindowResizerTest() {} 48 virtual ~DockedWindowResizerTest() {}
48 49
49 void SetUp() override { 50 void SetUp() override {
51 base::CommandLine::ForCurrentProcess()->AppendSwitch(
52 ash::switches::kAshEnableDockedWindows);
50 AshTestBase::SetUp(); 53 AshTestBase::SetUp();
51 UpdateDisplay("600x400"); 54 UpdateDisplay("600x400");
52 } 55 }
53 56
54 void TearDown() override { AshTestBase::TearDown(); } 57 void TearDown() override { AshTestBase::TearDown(); }
55 58
56 protected: 59 protected:
57 enum DockedEdge { 60 enum DockedEdge {
58 DOCKED_EDGE_NONE, 61 DOCKED_EDGE_NONE,
59 DOCKED_EDGE_LEFT, 62 DOCKED_EDGE_LEFT,
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 EXPECT_TRUE(window_state->IsMaximized()); 1495 EXPECT_TRUE(window_state->IsMaximized());
1493 } 1496 }
1494 1497
1495 // Tests run twice - on both panels and normal windows 1498 // Tests run twice - on both panels and normal windows
1496 INSTANTIATE_TEST_CASE_P(NormalOrPanel, 1499 INSTANTIATE_TEST_CASE_P(NormalOrPanel,
1497 DockedWindowResizerTest, 1500 DockedWindowResizerTest,
1498 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, 1501 testing::Values(ui::wm::WINDOW_TYPE_NORMAL,
1499 ui::wm::WINDOW_TYPE_PANEL)); 1502 ui::wm::WINDOW_TYPE_PANEL));
1500 1503
1501 } // namespace ash 1504 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698