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/launcher/launcher.h" | 8 #include "ash/launcher/launcher.h" |
9 #include "ash/launcher/launcher_model.h" | 9 #include "ash/launcher/launcher_model.h" |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.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<aura::client::WindowType> { | 43 public testing::WithParamInterface<aura::client::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::kAshEnableStickyEdges); | |
51 CommandLine::ForCurrentProcess()->AppendSwitch( | |
52 ash::switches::kAshEnableDockedWindows); | |
53 AshTestBase::SetUp(); | 49 AshTestBase::SetUp(); |
54 UpdateDisplay("600x600"); | 50 UpdateDisplay("600x600"); |
55 ASSERT_TRUE(test::TestLauncherDelegate::instance()); | 51 ASSERT_TRUE(test::TestLauncherDelegate::instance()); |
56 | 52 |
57 shelf_view_test_.reset(new test::ShelfViewTestAPI( | 53 shelf_view_test_.reset(new test::ShelfViewTestAPI( |
58 test::LauncherTestAPI(Launcher::ForPrimaryDisplay()).shelf_view())); | 54 test::LauncherTestAPI(Launcher::ForPrimaryDisplay()).shelf_view())); |
59 shelf_view_test_->SetAnimationDuration(1); | 55 shelf_view_test_->SetAnimationDuration(1); |
60 } | 56 } |
61 | 57 |
62 protected: | 58 protected: |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 EXPECT_LT(w2->GetBoundsInScreen().height(), work_area.height() / 2 - 10); | 808 EXPECT_LT(w2->GetBoundsInScreen().height(), work_area.height() / 2 - 10); |
813 } | 809 } |
814 | 810 |
815 // Tests run twice - on both panels and normal windows | 811 // Tests run twice - on both panels and normal windows |
816 INSTANTIATE_TEST_CASE_P(NormalOrPanel, | 812 INSTANTIATE_TEST_CASE_P(NormalOrPanel, |
817 DockedWindowLayoutManagerTest, | 813 DockedWindowLayoutManagerTest, |
818 testing::Values(aura::client::WINDOW_TYPE_NORMAL, | 814 testing::Values(aura::client::WINDOW_TYPE_NORMAL, |
819 aura::client::WINDOW_TYPE_PANEL)); | 815 aura::client::WINDOW_TYPE_PANEL)); |
820 } // namespace internal | 816 } // namespace internal |
821 } // namespace ash | 817 } // namespace ash |
OLD | NEW |