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

Unified Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 1998933002: Update shelf spacing in Chrome OS according to the MD specs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 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_layout_manager.cc ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager_unittest.cc
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
index 431d4ccc88d672da97ce1e8dfc145bb239a1c155..088221e19d20c65258de292b20ff3863ecfe1ecd 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -8,6 +8,7 @@
#include "ash/accelerators/accelerator_table.h"
#include "ash/ash_switches.h"
#include "ash/common/session/session_state_delegate.h"
+#include "ash/common/shelf/shelf_constants.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/system/tray/system_tray_item.h"
#include "ash/common/wm/window_state.h"
@@ -855,9 +856,9 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_AutoHide) {
// LayoutShelf() forces the animation to completion, at which point the
// shelf should go off the screen.
layout_manager->LayoutShelf();
- EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
+ EXPECT_EQ(root->bounds().bottom() - kShelfAutoHideSize,
GetShelfWidget()->GetWindowBoundsInScreen().y());
- EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
+ EXPECT_EQ(root->bounds().bottom() - kShelfAutoHideSize,
display::Screen::GetScreen()
->GetDisplayNearestWindow(root)
.work_area()
@@ -872,7 +873,7 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_AutoHide) {
layout_manager->LayoutShelf();
EXPECT_EQ(root->bounds().bottom() - layout_manager->GetIdealBounds().height(),
GetShelfWidget()->GetWindowBoundsInScreen().y());
- EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
+ EXPECT_EQ(root->bounds().bottom() - kShelfAutoHideSize,
display::Screen::GetScreen()
->GetDisplayNearestWindow(root)
.work_area()
@@ -883,7 +884,7 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_AutoHide) {
SetState(layout_manager, SHELF_AUTO_HIDE);
EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->GetAutoHideState());
layout_manager->LayoutShelf();
- EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
+ EXPECT_EQ(root->bounds().bottom() - kShelfAutoHideSize,
GetShelfWidget()->GetWindowBoundsInScreen().y());
// Drag mouse to bottom of screen.
@@ -1025,7 +1026,7 @@ TEST_F(ShelfLayoutManagerTest, VisibleWhenLockScreenShowing) {
// LayoutShelf() forces the animation to completion, at which point the
// shelf should go off the screen.
layout_manager->LayoutShelf();
- EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
+ EXPECT_EQ(root->bounds().bottom() - kShelfAutoHideSize,
GetShelfWidget()->GetWindowBoundsInScreen().y());
aura::Window* lock_container = Shell::GetContainer(
@@ -1702,9 +1703,8 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetAlignment) {
EXPECT_EQ(display.bounds().height(), shelf_bounds.height());
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
display = screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- EXPECT_EQ(ShelfLayoutManager::kAutoHideSize,
- display.GetWorkAreaInsets().left());
- EXPECT_EQ(ShelfLayoutManager::kAutoHideSize, display.work_area().x());
+ EXPECT_EQ(kShelfAutoHideSize, display.GetWorkAreaInsets().left());
+ EXPECT_EQ(kShelfAutoHideSize, display.work_area().x());
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT);
@@ -1730,10 +1730,9 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetAlignment) {
EXPECT_EQ(display.bounds().height(), shelf_bounds.height());
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
display = screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- EXPECT_EQ(ShelfLayoutManager::kAutoHideSize,
- display.GetWorkAreaInsets().right());
- EXPECT_EQ(ShelfLayoutManager::kAutoHideSize,
- display.bounds().right() - display.work_area().right());
+ EXPECT_EQ(kShelfAutoHideSize, display.GetWorkAreaInsets().right());
+ EXPECT_EQ(kShelfAutoHideSize,
+ display.bounds().right() - display.work_area().right());
}
TEST_F(ShelfLayoutManagerTest, GestureEdgeSwipe) {
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698