OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/shell.h" | 5 #include "ash/shell.h" |
6 #include "ash/shell_window_ids.h" | 6 #include "ash/shell_window_ids.h" |
7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
8 #include "ash/test/test_shell_delegate.h" | 8 #include "ash/test/test_shell_delegate.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 AppListControllerTest::AppListControllerTest() { | 38 AppListControllerTest::AppListControllerTest() { |
39 } | 39 } |
40 | 40 |
41 AppListControllerTest::~AppListControllerTest() { | 41 AppListControllerTest::~AppListControllerTest() { |
42 } | 42 } |
43 | 43 |
44 void AppListControllerTest::SetUp() { | 44 void AppListControllerTest::SetUp() { |
45 AshTestBase::SetUp(); | 45 AshTestBase::SetUp(); |
46 if (IsCentered()) { | 46 if (IsCentered()) { |
47 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 47 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
48 command_line->AppendSwitch(app_list::switches::kEnableCenteredAppList); | 48 command_line->AppendSwitch(app_list::switches::kEnableCenteredAppList); |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 bool AppListControllerTest::IsCentered() const { | 52 bool AppListControllerTest::IsCentered() const { |
53 return GetParam(); | 53 return GetParam(); |
54 } | 54 } |
55 | 55 |
56 // Tests that app launcher hides when focus moves to a normal window. | 56 // Tests that app launcher hides when focus moves to a normal window. |
57 TEST_P(AppListControllerTest, HideOnFocusOut) { | 57 TEST_P(AppListControllerTest, HideOnFocusOut) { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 int app_list_view_top = | 178 int app_list_view_top = |
179 app_list->anchor_rect().y() - app_list->bounds().height() / 2; | 179 app_list->anchor_rect().y() - app_list->bounds().height() / 2; |
180 EXPECT_GE(app_list_view_top, kMinimalCenteredAppListMargin); | 180 EXPECT_GE(app_list_view_top, kMinimalCenteredAppListMargin); |
181 } | 181 } |
182 | 182 |
183 INSTANTIATE_TEST_CASE_P(AppListControllerTestInstance, | 183 INSTANTIATE_TEST_CASE_P(AppListControllerTestInstance, |
184 AppListControllerTest, | 184 AppListControllerTest, |
185 ::testing::Bool()); | 185 ::testing::Bool()); |
186 | 186 |
187 } // namespace ash | 187 } // namespace ash |
OLD | NEW |