Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: ash/shelf/shelf_widget_unittest.cc

Issue 2036353002: mash: Move ash/common/wm/shelf to ash/common/shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_widget.cc ('k') | ash/shelf/shelf_window_watcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_widget_unittest.cc
diff --git a/ash/shelf/shelf_widget_unittest.cc b/ash/shelf/shelf_widget_unittest.cc
index bb92a772674aad4e484a82459dc20b134849e754..354cb262aa0986c139044cdd703b4c1cbaa630d8 100644
--- a/ash/shelf/shelf_widget_unittest.cc
+++ b/ash/shelf/shelf_widget_unittest.cc
@@ -40,7 +40,7 @@ ShelfLayoutManager* GetShelfLayoutManager() {
typedef test::AshTestBase ShelfWidgetTest;
void TestLauncherAlignment(aura::Window* root,
- wm::ShelfAlignment alignment,
+ ShelfAlignment alignment,
const std::string& expected) {
Shelf::ForWindow(root)->SetAlignment(alignment);
display::Screen* screen = display::Screen::GetScreen();
@@ -58,23 +58,23 @@ TEST_F(ShelfWidgetTest, MAYBE_TestAlignment) {
UpdateDisplay("400x400");
{
SCOPED_TRACE("Single Bottom");
- TestLauncherAlignment(Shell::GetPrimaryRootWindow(),
- wm::SHELF_ALIGNMENT_BOTTOM, "0,0 400x353");
+ TestLauncherAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_BOTTOM,
+ "0,0 400x353");
}
{
SCOPED_TRACE("Single Locked");
TestLauncherAlignment(Shell::GetPrimaryRootWindow(),
- wm::SHELF_ALIGNMENT_BOTTOM_LOCKED, "0,0 400x353");
+ SHELF_ALIGNMENT_BOTTOM_LOCKED, "0,0 400x353");
}
{
SCOPED_TRACE("Single Right");
- TestLauncherAlignment(Shell::GetPrimaryRootWindow(),
- wm::SHELF_ALIGNMENT_RIGHT, "0,0 353x400");
+ TestLauncherAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_RIGHT,
+ "0,0 353x400");
}
{
SCOPED_TRACE("Single Left");
- TestLauncherAlignment(Shell::GetPrimaryRootWindow(),
- wm::SHELF_ALIGNMENT_LEFT, "47,0 353x400");
+ TestLauncherAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_LEFT,
+ "47,0 353x400");
}
if (!SupportsMultipleDisplays())
return;
@@ -83,42 +83,42 @@ TEST_F(ShelfWidgetTest, MAYBE_TestAlignment) {
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
{
SCOPED_TRACE("Primary Bottom");
- TestLauncherAlignment(root_windows[0], wm::SHELF_ALIGNMENT_BOTTOM,
+ TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_BOTTOM,
"0,0 300x253");
}
{
SCOPED_TRACE("Primary Locked");
- TestLauncherAlignment(root_windows[0], wm::SHELF_ALIGNMENT_BOTTOM_LOCKED,
+ TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_BOTTOM_LOCKED,
"0,0 300x253");
}
{
SCOPED_TRACE("Primary Right");
- TestLauncherAlignment(root_windows[0], wm::SHELF_ALIGNMENT_RIGHT,
+ TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_RIGHT,
"0,0 253x300");
}
{
SCOPED_TRACE("Primary Left");
- TestLauncherAlignment(root_windows[0], wm::SHELF_ALIGNMENT_LEFT,
+ TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_LEFT,
"47,0 253x300");
}
{
SCOPED_TRACE("Secondary Bottom");
- TestLauncherAlignment(root_windows[1], wm::SHELF_ALIGNMENT_BOTTOM,
+ TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_BOTTOM,
"300,0 500x453");
}
{
SCOPED_TRACE("Secondary Locked");
- TestLauncherAlignment(root_windows[1], wm::SHELF_ALIGNMENT_BOTTOM_LOCKED,
+ TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_BOTTOM_LOCKED,
"300,0 500x453");
}
{
SCOPED_TRACE("Secondary Right");
- TestLauncherAlignment(root_windows[1], wm::SHELF_ALIGNMENT_RIGHT,
+ TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_RIGHT,
"300,0 453x500");
}
{
SCOPED_TRACE("Secondary Left");
- TestLauncherAlignment(root_windows[1], wm::SHELF_ALIGNMENT_LEFT,
+ TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_LEFT,
"347,0 453x500");
}
}
@@ -229,7 +229,7 @@ TEST_F(ShelfWidgetTest, ShelfEdgeOverlappingWindowHitTestMouse) {
// Change shelf alignment to verify that the targeter insets are updated.
Shelf* shelf = Shelf::ForPrimaryDisplay();
- shelf->SetAlignment(wm::SHELF_ALIGNMENT_LEFT);
+ shelf->SetAlignment(SHELF_ALIGNMENT_LEFT);
shelf_layout_manager->LayoutShelf();
shelf_bounds = shelf_widget->GetWindowBoundsInScreen();
{
@@ -244,7 +244,7 @@ TEST_F(ShelfWidgetTest, ShelfEdgeOverlappingWindowHitTestMouse) {
}
// Now restore shelf alignment (bottom) and auto-hide (hidden) the shelf.
- shelf->SetAlignment(wm::SHELF_ALIGNMENT_BOTTOM);
+ shelf->SetAlignment(SHELF_ALIGNMENT_BOTTOM);
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
shelf_layout_manager->LayoutShelf();
EXPECT_EQ(SHELF_AUTO_HIDE, shelf_layout_manager->visibility_state());
@@ -327,7 +327,7 @@ namespace {
// OnShelfCreated, to simulate ChromeLauncherController's behavior.
class TestShelfDelegate : public ShelfDelegate {
public:
- TestShelfDelegate(wm::ShelfAlignment initial_alignment,
+ TestShelfDelegate(ShelfAlignment initial_alignment,
ShelfAutoHideBehavior initial_auto_hide_behavior)
: initial_alignment_(initial_alignment),
initial_auto_hide_behavior_(initial_auto_hide_behavior) {}
@@ -353,7 +353,7 @@ class TestShelfDelegate : public ShelfDelegate {
void UnpinAppWithID(const std::string& app_id) override {}
private:
- wm::ShelfAlignment initial_alignment_;
+ ShelfAlignment initial_alignment_;
ShelfAutoHideBehavior initial_auto_hide_behavior_;
DISALLOW_COPY_AND_ASSIGN(TestShelfDelegate);
@@ -371,7 +371,7 @@ class ShelfWidgetTestShellDelegate : public test::TestShellDelegate {
initial_auto_hide_behavior_);
}
- void set_initial_alignment(wm::ShelfAlignment alignment) {
+ void set_initial_alignment(ShelfAlignment alignment) {
initial_alignment_ = alignment;
}
@@ -380,7 +380,7 @@ class ShelfWidgetTestShellDelegate : public test::TestShellDelegate {
}
private:
- wm::ShelfAlignment initial_alignment_ = wm::SHELF_ALIGNMENT_BOTTOM;
+ ShelfAlignment initial_alignment_ = SHELF_ALIGNMENT_BOTTOM;
ShelfAutoHideBehavior initial_auto_hide_behavior_ =
SHELF_AUTO_HIDE_BEHAVIOR_NEVER;
DISALLOW_COPY_AND_ASSIGN(ShelfWidgetTestShellDelegate);
@@ -400,7 +400,7 @@ class ShelfWidgetTestWithDelegate : public ShelfWidgetTest {
}
void TestCreateShelfWithInitialValues(
- wm::ShelfAlignment initial_alignment,
+ ShelfAlignment initial_alignment,
ShelfAutoHideBehavior initial_auto_hide_behavior,
ShelfVisibilityState expected_shelf_visibility_state,
ShelfAutoHideState expected_shelf_auto_hide_state) {
@@ -435,28 +435,28 @@ class ShelfWidgetTestWithDelegate : public ShelfWidgetTest {
TEST_F(ShelfWidgetTestWithDelegate, CreateAutoHideAlwaysShelf) {
// The actual auto hide state is shown because there are no open windows.
- TestCreateShelfWithInitialValues(wm::SHELF_ALIGNMENT_BOTTOM,
+ TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM,
SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS,
SHELF_AUTO_HIDE, SHELF_AUTO_HIDE_SHOWN);
}
TEST_F(ShelfWidgetTestWithDelegate, CreateAutoHideNeverShelf) {
// The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
- TestCreateShelfWithInitialValues(wm::SHELF_ALIGNMENT_LEFT,
+ TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_LEFT,
SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
}
TEST_F(ShelfWidgetTestWithDelegate, CreateAutoHideAlwaysHideShelf) {
// The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
- TestCreateShelfWithInitialValues(wm::SHELF_ALIGNMENT_RIGHT,
+ TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_RIGHT,
SHELF_AUTO_HIDE_ALWAYS_HIDDEN, SHELF_HIDDEN,
SHELF_AUTO_HIDE_HIDDEN);
}
TEST_F(ShelfWidgetTestWithDelegate, CreateLockedShelf) {
// The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
- TestCreateShelfWithInitialValues(wm::SHELF_ALIGNMENT_BOTTOM_LOCKED,
+ TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_BOTTOM_LOCKED,
SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
}
« no previous file with comments | « ash/shelf/shelf_widget.cc ('k') | ash/shelf/shelf_window_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698