Chromium Code Reviews| Index: ash/wm/overview/window_selector_unittest.cc |
| diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc |
| index e0bc70bfbd96b5a6c5b33fb5024904e156ed4f2c..30020b12d2207e386f1c4c7e7276d784fee93251 100644 |
| --- a/ash/wm/overview/window_selector_unittest.cc |
| +++ b/ash/wm/overview/window_selector_unittest.cc |
| @@ -104,7 +104,7 @@ float GetItemScale(const gfx::Rect& source, |
| // declaration. |
| class WindowSelectorTest |
| : public test::AshTestBase, |
| - public testing::WithParamInterface<ash::MaterialDesignController::Mode> { |
| + public testing::WithParamInterface<MaterialDesignController::Mode> { |
|
James Cook
2016/06/28 22:34:25
I would leave the MaterialDesignController ones. T
msw
2016/06/28 22:49:50
Done.
|
| public: |
| WindowSelectorTest() {} |
| ~WindowSelectorTest() override {} |
| @@ -113,7 +113,7 @@ class WindowSelectorTest |
| test::AshTestBase::SetUp(); |
| material_design_state_.reset( |
| new test::MaterialDesignControllerTestAPI(GetParam())); |
| - if (!ash::MaterialDesignController::IsOverviewMaterial()) { |
| + if (!MaterialDesignController::IsOverviewMaterial()) { |
| base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| switches::kAshEnableStableOverviewOrder); |
| } |
| @@ -140,7 +140,7 @@ class WindowSelectorTest |
| aura::Window* window = CreateWindow(bounds); |
| aura::client::SetActivationDelegate(window, |
| &non_activatable_activation_delegate_); |
| - EXPECT_FALSE(ash::wm::CanActivateWindow(window)); |
| + EXPECT_FALSE(wm::CanActivateWindow(window)); |
| return window; |
| } |
| @@ -290,11 +290,11 @@ class WindowSelectorTest |
| .IsIdentity(); |
| } |
| - views::Widget* GetCloseButton(ash::WindowSelectorItem* window) { |
| + views::Widget* GetCloseButton(WindowSelectorItem* window) { |
| return window->close_button_->GetWidget(); |
| } |
| - views::LabelButton* GetLabelButtonView(ash::WindowSelectorItem* window) { |
| + views::LabelButton* GetLabelButtonView(WindowSelectorItem* window) { |
| return window->window_label_button_view_; |
| } |
| @@ -337,9 +337,9 @@ class WindowSelectorTest |
| INSTANTIATE_TEST_CASE_P( |
| , |
| WindowSelectorTest, |
| - testing::Values(ash::MaterialDesignController::NON_MATERIAL, |
| - ash::MaterialDesignController::MATERIAL_NORMAL, |
| - ash::MaterialDesignController::MATERIAL_EXPERIMENTAL)); |
| + testing::Values(MaterialDesignController::NON_MATERIAL, |
| + MaterialDesignController::MATERIAL_NORMAL, |
| + MaterialDesignController::MATERIAL_EXPERIMENTAL)); |
| #if !defined(OS_WIN) || defined(USE_ASH) |
| // TODO(msw): Broken on Windows. http://crbug.com/584038 |
| @@ -370,7 +370,7 @@ TEST_P(WindowSelectorTest, OverviewScreenRotation) { |
| // y: -kTextFilterHeightMD (since there's no text in the filter). |
| // w: std::min(kTextFilterWidthMD, total_bounds.width()). |
| // h: kTextFilterHeightMD. |
| - const bool material = ash::MaterialDesignController::IsOverviewMaterial(); |
| + const bool material = MaterialDesignController::IsOverviewMaterial(); |
| gfx::Rect expected_bounds(150, -32, 100, 32); |
| gfx::Rect expected_bounds_MD(60, -40, 280, 40); |
| EXPECT_EQ((material ? expected_bounds_MD : expected_bounds).ToString(), |
| @@ -391,8 +391,7 @@ TEST_P(WindowSelectorTest, OverviewScreenRotation) { |
| // Tests that an a11y alert is sent on entering overview mode. |
| TEST_P(WindowSelectorTest, A11yAlertOnOverviewMode) { |
| gfx::Rect bounds(0, 0, 400, 400); |
| - AccessibilityDelegate* delegate = |
| - ash::Shell::GetInstance()->accessibility_delegate(); |
| + AccessibilityDelegate* delegate = WmShell::Get()->GetAccessibilityDelegate(); |
| std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); |
| EXPECT_NE(delegate->GetLastAccessibilityAlert(), |
| A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED); |
| @@ -452,7 +451,7 @@ TEST_P(WindowSelectorTest, Basic) { |
| // Tests that the ordering of windows is near the windows' original positions. |
| TEST_P(WindowSelectorTest, MinimizeMovement) { |
| // With Material Design the order of windows in overview mode is MRU. |
| - if (ash::MaterialDesignController::IsOverviewMaterial()) |
| + if (MaterialDesignController::IsOverviewMaterial()) |
| return; |
| aura::Window* root_window = Shell::GetPrimaryRootWindow(); |
| gfx::Rect left_bounds(0, 0, root_window->bounds().width() / 2, |
| @@ -496,7 +495,7 @@ TEST_P(WindowSelectorTest, MinimizeMovement) { |
| // on a second display. |
| TEST_P(WindowSelectorTest, MinimizeMovementSecondDisplay) { |
| // With Material Design the order of windows in overview mode is MRU. |
| - if (ash::MaterialDesignController::IsOverviewMaterial() || |
| + if (MaterialDesignController::IsOverviewMaterial() || |
| !SupportsMultipleDisplays()) { |
| return; |
| } |
| @@ -546,7 +545,7 @@ TEST_P(WindowSelectorTest, WindowsOrder) { |
| int initial_order[3] = {overview1[0]->GetWindow()->GetShellWindowId(), |
| overview1[1]->GetWindow()->GetShellWindowId(), |
| overview1[2]->GetWindow()->GetShellWindowId()}; |
| - if (ash::MaterialDesignController::IsOverviewMaterial()) { |
| + if (MaterialDesignController::IsOverviewMaterial()) { |
| // With Material Design the order should be MRU. |
| EXPECT_EQ(1, overview1[0]->GetWindow()->GetShellWindowId()); |
| EXPECT_EQ(3, overview1[1]->GetWindow()->GetShellWindowId()); |
| @@ -559,7 +558,7 @@ TEST_P(WindowSelectorTest, WindowsOrder) { |
| ToggleOverview(); |
| const std::vector<WindowSelectorItem*>& overview2(GetWindowItemsForRoot(0)); |
| - if (ash::MaterialDesignController::IsOverviewMaterial()) { |
| + if (MaterialDesignController::IsOverviewMaterial()) { |
| // With Material Design the order should be MRU. |
| EXPECT_EQ(2, overview2[0]->GetWindow()->GetShellWindowId()); |
| EXPECT_EQ(1, overview2[1]->GetWindow()->GetShellWindowId()); |
| @@ -930,8 +929,7 @@ TEST_P(WindowSelectorTest, OverviewUndimsShelf) { |
| std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); |
| wm::WindowState* window_state = wm::GetWindowState(window1.get()); |
| window_state->Maximize(); |
| - ash::ShelfWidget* shelf = |
| - Shell::GetPrimaryRootWindowController()->shelf_widget(); |
| + ShelfWidget* shelf = Shell::GetPrimaryRootWindowController()->shelf_widget(); |
| EXPECT_TRUE(shelf->GetDimsShelf()); |
| ToggleOverview(); |
| EXPECT_FALSE(shelf->GetDimsShelf()); |
| @@ -1275,7 +1273,7 @@ TEST_P(WindowSelectorTest, DISABLED_DragDropInProgress) { |
| gfx::Rect bounds(0, 0, 400, 400); |
| std::unique_ptr<aura::Window> window(CreateWindow(bounds)); |
| test::ShellTestApi shell_test_api(Shell::GetInstance()); |
| - ash::DragDropController* drag_drop_controller = |
| + DragDropController* drag_drop_controller = |
| shell_test_api.drag_drop_controller(); |
| ui::OSExchangeData data; |
| base::ThreadTaskRunnerHandle::Get()->PostTask( |
| @@ -1316,7 +1314,7 @@ TEST_P(WindowSelectorTest, CreateLabelUnderWindow) { |
| // Labels are located based on target_bounds, not the actual window item |
| // bounds. |
| gfx::Rect label_bounds = label->GetWidget()->GetWindowBoundsInScreen(); |
| - if (ash::MaterialDesignController::IsOverviewMaterial()) |
| + if (MaterialDesignController::IsOverviewMaterial()) |
| label_bounds.Inset(kWindowMarginMD, kWindowMarginMD); |
| EXPECT_EQ(window_item->target_bounds(), label_bounds); |
| } |
| @@ -1424,7 +1422,7 @@ TEST_P(WindowSelectorTest, BasicArrowKeyNavigation) { |
| SendKey(arrow_keys[key_index]); |
| // TODO(flackr): Add a more readable error message by constructing a |
| // string from the window IDs. |
| - const int index = ash::MaterialDesignController::IsOverviewMaterial() |
| + const int index = MaterialDesignController::IsOverviewMaterial() |
| ? index_path_for_direction_MD[key_index][i] |
| : index_path_for_direction[key_index][i]; |
| EXPECT_EQ(GetSelectedWindow()->id(), |
| @@ -1807,7 +1805,7 @@ TEST_P(WindowSelectorTest, TransformedRectIsCenteredWithInset) { |
| gfx::Rect transformed_rect = |
| ScopedTransformOverviewWindow::ShrinkRectToFitPreservingAspectRatio( |
| rect, bounds, inset, header_height); |
| - if (ash::MaterialDesignController::IsOverviewMaterial()) { |
| + if (MaterialDesignController::IsOverviewMaterial()) { |
| // With Material Design the |rect| width does not fit and therefore it gets |
| // centered outside |bounds| starting before |bounds.x()| and ending after |
| // |bounds.right()|. |