| 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/display/display_controller.h" | 8 #include "ash/display/display_controller.h" |
| 9 #include "ash/launcher/launcher.h" | 9 #include "ash/launcher/launcher.h" |
| 10 #include "ash/launcher/launcher_model.h" | 10 #include "ash/launcher/launcher_model.h" |
| 11 #include "ash/root_window_controller.h" | 11 #include "ash/root_window_controller.h" |
| 12 #include "ash/screen_ash.h" | 12 #include "ash/screen_ash.h" |
| 13 #include "ash/shelf/shelf_layout_manager.h" | 13 #include "ash/shelf/shelf_layout_manager.h" |
| 14 #include "ash/shelf/shelf_types.h" | 14 #include "ash/shelf/shelf_types.h" |
| 15 #include "ash/shelf/shelf_widget.h" | 15 #include "ash/shelf/shelf_widget.h" |
| 16 #include "ash/shell.h" | 16 #include "ash/shell.h" |
| 17 #include "ash/shell_window_ids.h" | 17 #include "ash/shell_window_ids.h" |
| 18 #include "ash/test/ash_test_base.h" | 18 #include "ash/test/ash_test_base.h" |
| 19 #include "ash/test/launcher_test_api.h" |
| 19 #include "ash/test/launcher_view_test_api.h" | 20 #include "ash/test/launcher_view_test_api.h" |
| 20 #include "ash/test/shell_test_api.h" | 21 #include "ash/test/shell_test_api.h" |
| 21 #include "ash/test/test_launcher_delegate.h" | 22 #include "ash/test/test_launcher_delegate.h" |
| 22 #include "ash/wm/panels/panel_layout_manager.h" | 23 #include "ash/wm/panels/panel_layout_manager.h" |
| 23 #include "ash/wm/window_resizer.h" | 24 #include "ash/wm/window_resizer.h" |
| 24 #include "ash/wm/window_settings.h" | 25 #include "ash/wm/window_settings.h" |
| 25 #include "base/basictypes.h" | 26 #include "base/basictypes.h" |
| 26 #include "base/command_line.h" | 27 #include "base/command_line.h" |
| 27 #include "ui/aura/client/aura_constants.h" | 28 #include "ui/aura/client/aura_constants.h" |
| 28 #include "ui/aura/root_window.h" | 29 #include "ui/aura/root_window.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 44 virtual void SetUp() OVERRIDE { | 45 virtual void SetUp() OVERRIDE { |
| 45 CommandLine::ForCurrentProcess()->AppendSwitch( | 46 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 46 ash::switches::kAshEnableStickyEdges); | 47 ash::switches::kAshEnableStickyEdges); |
| 47 CommandLine::ForCurrentProcess()->AppendSwitch( | 48 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 48 ash::switches::kAshEnableDockedWindows); | 49 ash::switches::kAshEnableDockedWindows); |
| 49 AshTestBase::SetUp(); | 50 AshTestBase::SetUp(); |
| 50 UpdateDisplay("600x600"); | 51 UpdateDisplay("600x600"); |
| 51 ASSERT_TRUE(test::TestLauncherDelegate::instance()); | 52 ASSERT_TRUE(test::TestLauncherDelegate::instance()); |
| 52 | 53 |
| 53 launcher_view_test_.reset(new test::LauncherViewTestAPI( | 54 launcher_view_test_.reset(new test::LauncherViewTestAPI( |
| 54 Launcher::ForPrimaryDisplay()->GetLauncherViewForTest())); | 55 test::LauncherTestAPI(Launcher::ForPrimaryDisplay()).launcher_view())); |
| 55 launcher_view_test_->SetAnimationDuration(1); | 56 launcher_view_test_->SetAnimationDuration(1); |
| 56 } | 57 } |
| 57 | 58 |
| 58 protected: | 59 protected: |
| 59 enum DockedEdge { | 60 enum DockedEdge { |
| 60 DOCKED_EDGE_NONE, | 61 DOCKED_EDGE_NONE, |
| 61 DOCKED_EDGE_LEFT, | 62 DOCKED_EDGE_LEFT, |
| 62 DOCKED_EDGE_RIGHT, | 63 DOCKED_EDGE_RIGHT, |
| 63 }; | 64 }; |
| 64 | 65 |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 EXPECT_EQ(0, overlap4); | 428 EXPECT_EQ(0, overlap4); |
| 428 } | 429 } |
| 429 | 430 |
| 430 // Tests run twice - on both panels and normal windows | 431 // Tests run twice - on both panels and normal windows |
| 431 INSTANTIATE_TEST_CASE_P(NormalOrPanel, | 432 INSTANTIATE_TEST_CASE_P(NormalOrPanel, |
| 432 DockedWindowLayoutManagerTest, | 433 DockedWindowLayoutManagerTest, |
| 433 testing::Values(aura::client::WINDOW_TYPE_NORMAL, | 434 testing::Values(aura::client::WINDOW_TYPE_NORMAL, |
| 434 aura::client::WINDOW_TYPE_PANEL)); | 435 aura::client::WINDOW_TYPE_PANEL)); |
| 435 } // namespace internal | 436 } // namespace internal |
| 436 } // namespace ash | 437 } // namespace ash |
| OLD | NEW |