| Index: ash/wm/panels/panel_layout_manager_unittest.cc
|
| diff --git a/ash/wm/panels/panel_layout_manager_unittest.cc b/ash/wm/panels/panel_layout_manager_unittest.cc
|
| index 08a64b62ff07586c6f696e54f4159544922543df..6bc78df9603c231d39de02d5b4db885c418950db 100644
|
| --- a/ash/wm/panels/panel_layout_manager_unittest.cc
|
| +++ b/ash/wm/panels/panel_layout_manager_unittest.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "ash/ash_switches.h"
|
| #include "ash/aura/wm_window_aura.h"
|
| +#include "ash/common/shelf/shelf_types.h"
|
| #include "ash/common/shell_window_ids.h"
|
| #include "ash/common/wm/window_state.h"
|
| #include "ash/screen_util.h"
|
| @@ -13,7 +14,6 @@
|
| #include "ash/shelf/shelf_button.h"
|
| #include "ash/shelf/shelf_layout_manager.h"
|
| #include "ash/shelf/shelf_model.h"
|
| -#include "ash/shelf/shelf_types.h"
|
| #include "ash/shelf/shelf_util.h"
|
| #include "ash/shelf/shelf_view.h"
|
| #include "ash/shelf/shelf_widget.h"
|
| @@ -128,7 +128,7 @@ class PanelLayoutManagerTest : public test::AshTestBase {
|
| ASSERT_LT(icon_bounds.width(), window_bounds.width());
|
| ASSERT_LT(icon_bounds.height(), window_bounds.height());
|
| gfx::Rect shelf_bounds = shelf->shelf_widget()->GetWindowBoundsInScreen();
|
| - wm::ShelfAlignment alignment = GetAlignment(panel->GetRootWindow());
|
| + ShelfAlignment alignment = GetAlignment(panel->GetRootWindow());
|
|
|
| if (IsHorizontal(alignment)) {
|
| // The horizontal bounds of the panel window should contain the bounds of
|
| @@ -142,9 +142,9 @@ class PanelLayoutManagerTest : public test::AshTestBase {
|
| EXPECT_GE(window_bounds.bottom(), icon_bounds.bottom());
|
| }
|
|
|
| - if (alignment == wm::SHELF_ALIGNMENT_LEFT)
|
| + if (alignment == SHELF_ALIGNMENT_LEFT)
|
| EXPECT_EQ(shelf_bounds.right(), window_bounds.x());
|
| - else if (alignment == wm::SHELF_ALIGNMENT_RIGHT)
|
| + else if (alignment == SHELF_ALIGNMENT_RIGHT)
|
| EXPECT_EQ(shelf_bounds.x(), window_bounds.right());
|
| else
|
| EXPECT_EQ(shelf_bounds.y(), window_bounds.bottom());
|
| @@ -165,10 +165,10 @@ class PanelLayoutManagerTest : public test::AshTestBase {
|
|
|
| EXPECT_TRUE(widget->IsVisible());
|
|
|
| - wm::ShelfAlignment alignment = GetAlignment(panel->GetRootWindow());
|
| - if (alignment == wm::SHELF_ALIGNMENT_LEFT)
|
| + ShelfAlignment alignment = GetAlignment(panel->GetRootWindow());
|
| + if (alignment == SHELF_ALIGNMENT_LEFT)
|
| EXPECT_EQ(panel_bounds.x(), callout_bounds.right());
|
| - else if (alignment == wm::SHELF_ALIGNMENT_RIGHT)
|
| + else if (alignment == SHELF_ALIGNMENT_RIGHT)
|
| EXPECT_EQ(panel_bounds.right(), callout_bounds.x());
|
| else
|
| EXPECT_EQ(panel_bounds.bottom(), callout_bounds.y());
|
| @@ -210,11 +210,11 @@ class PanelLayoutManagerTest : public test::AshTestBase {
|
| test_api.RunMessageLoopUntilAnimationsDone();
|
| }
|
|
|
| - void SetAlignment(aura::Window* root_window, wm::ShelfAlignment alignment) {
|
| + void SetAlignment(aura::Window* root_window, ShelfAlignment alignment) {
|
| Shelf::ForWindow(root_window)->SetAlignment(alignment);
|
| }
|
|
|
| - wm::ShelfAlignment GetAlignment(const aura::Window* root_window) {
|
| + ShelfAlignment GetAlignment(const aura::Window* root_window) {
|
| return Shelf::ForWindow(root_window)->alignment();
|
| }
|
|
|
| @@ -239,8 +239,8 @@ class PanelLayoutManagerTest : public test::AshTestBase {
|
| private:
|
| std::unique_ptr<test::ShelfViewTestAPI> shelf_view_test_;
|
|
|
| - bool IsHorizontal(wm::ShelfAlignment alignment) {
|
| - return alignment == wm::SHELF_ALIGNMENT_BOTTOM;
|
| + bool IsHorizontal(ShelfAlignment alignment) {
|
| + return alignment == SHELF_ALIGNMENT_BOTTOM;
|
| }
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PanelLayoutManagerTest);
|
| @@ -368,7 +368,7 @@ TEST_F(PanelLayoutManagerTest, MultiplePanelStacking) {
|
|
|
| TEST_F(PanelLayoutManagerTest, MultiplePanelStackingVertical) {
|
| // Set shelf to be aligned on the right.
|
| - SetAlignment(Shell::GetPrimaryRootWindow(), wm::SHELF_ALIGNMENT_RIGHT);
|
| + SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_RIGHT);
|
|
|
| // Size panels in such a way that ordering them by X coordinate would cause
|
| // stacking order to be incorrect. Test that stacking order is based on Y.
|
| @@ -687,10 +687,10 @@ TEST_F(PanelLayoutManagerTest, PanelAlignmentSecondDisplay) {
|
| IsPanelAboveLauncherIcon(p1_d2.get());
|
| IsCalloutAboveLauncherIcon(p1_d2.get());
|
|
|
| - SetAlignment(root_windows[1], wm::SHELF_ALIGNMENT_RIGHT);
|
| + SetAlignment(root_windows[1], SHELF_ALIGNMENT_RIGHT);
|
| IsPanelAboveLauncherIcon(p1_d2.get());
|
| IsCalloutAboveLauncherIcon(p1_d2.get());
|
| - SetAlignment(root_windows[1], wm::SHELF_ALIGNMENT_LEFT);
|
| + SetAlignment(root_windows[1], SHELF_ALIGNMENT_LEFT);
|
| IsPanelAboveLauncherIcon(p1_d2.get());
|
| IsCalloutAboveLauncherIcon(p1_d2.get());
|
| }
|
| @@ -698,7 +698,7 @@ TEST_F(PanelLayoutManagerTest, PanelAlignmentSecondDisplay) {
|
| TEST_F(PanelLayoutManagerTest, AlignmentLeft) {
|
| gfx::Rect bounds(0, 0, 201, 201);
|
| std::unique_ptr<aura::Window> w(CreatePanelWindow(bounds));
|
| - SetAlignment(Shell::GetPrimaryRootWindow(), wm::SHELF_ALIGNMENT_LEFT);
|
| + SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_LEFT);
|
| IsPanelAboveLauncherIcon(w.get());
|
| IsCalloutAboveLauncherIcon(w.get());
|
| }
|
| @@ -706,7 +706,7 @@ TEST_F(PanelLayoutManagerTest, AlignmentLeft) {
|
| TEST_F(PanelLayoutManagerTest, AlignmentRight) {
|
| gfx::Rect bounds(0, 0, 201, 201);
|
| std::unique_ptr<aura::Window> w(CreatePanelWindow(bounds));
|
| - SetAlignment(Shell::GetPrimaryRootWindow(), wm::SHELF_ALIGNMENT_RIGHT);
|
| + SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_RIGHT);
|
| IsPanelAboveLauncherIcon(w.get());
|
| IsCalloutAboveLauncherIcon(w.get());
|
| }
|
| @@ -778,7 +778,7 @@ TEST_F(PanelLayoutManagerTest, TouchHitTestPanel) {
|
| // in src/ash/root_window_controller.cc.
|
|
|
| // Hit test outside the right edge with a bottom-aligned shelf.
|
| - SetAlignment(Shell::GetPrimaryRootWindow(), wm::SHELF_ALIGNMENT_BOTTOM);
|
| + SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_BOTTOM);
|
| gfx::Rect bounds(w->bounds());
|
| ui::TouchEvent touch(ui::ET_TOUCH_PRESSED,
|
| gfx::Point(bounds.right() + 3, bounds.y() + 2),
|
| @@ -792,7 +792,7 @@ TEST_F(PanelLayoutManagerTest, TouchHitTestPanel) {
|
| EXPECT_NE(w.get(), target);
|
|
|
| // Hit test outside the bottom edge with a right-aligned shelf.
|
| - SetAlignment(Shell::GetPrimaryRootWindow(), wm::SHELF_ALIGNMENT_RIGHT);
|
| + SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_RIGHT);
|
| bounds = w->bounds();
|
| touch.set_location(gfx::Point(bounds.x() + 6, bounds.bottom() + 5));
|
| target = targeter->FindTargetForEvent(root, &touch);
|
| @@ -804,7 +804,7 @@ TEST_F(PanelLayoutManagerTest, TouchHitTestPanel) {
|
| EXPECT_NE(w.get(), target);
|
|
|
| // Hit test outside the top edge with a left-aligned shelf.
|
| - SetAlignment(Shell::GetPrimaryRootWindow(), wm::SHELF_ALIGNMENT_LEFT);
|
| + SetAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_LEFT);
|
| bounds = w->bounds();
|
| touch.set_location(gfx::Point(bounds.x() + 4, bounds.y() - 6));
|
| target = targeter->FindTargetForEvent(root, &touch);
|
|
|