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

Unified Diff: ash/shelf/shelf_widget_unittest.cc

Issue 1877543002: Revise the shelf alignment locking mechanism. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move logic to a new ShelfLockingManager, owned by Shelf. Created 4 years, 8 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
Index: ash/shelf/shelf_widget_unittest.cc
diff --git a/ash/shelf/shelf_widget_unittest.cc b/ash/shelf/shelf_widget_unittest.cc
index c1f778062f5cc3e90c8aee333a79e0eed7482b91..8696813a959933a24f6bf855cc597868cb8bc95d 100644
--- a/ash/shelf/shelf_widget_unittest.cc
+++ b/ash/shelf/shelf_widget_unittest.cc
@@ -65,6 +65,11 @@ TEST_F(ShelfWidgetTest, MAYBE_TestAlignment) {
"0,0 400x353");
}
{
+ SCOPED_TRACE("Single Locked");
+ TestLauncherAlignment(Shell::GetPrimaryRootWindow(), SHELF_ALIGNMENT_LOCKED,
+ "0,0 400x353");
+ }
+ {
SCOPED_TRACE("Single Right");
TestLauncherAlignment(Shell::GetPrimaryRootWindow(),
SHELF_ALIGNMENT_RIGHT,
@@ -88,6 +93,11 @@ TEST_F(ShelfWidgetTest, MAYBE_TestAlignment) {
"0,0 300x253");
}
{
+ SCOPED_TRACE("Primary Locked");
+ TestLauncherAlignment(root_windows[0], SHELF_ALIGNMENT_LOCKED,
+ "0,0 300x253");
+ }
+ {
SCOPED_TRACE("Primary Right");
TestLauncherAlignment(root_windows[0],
SHELF_ALIGNMENT_RIGHT,
@@ -106,6 +116,11 @@ TEST_F(ShelfWidgetTest, MAYBE_TestAlignment) {
"300,0 500x453");
}
{
+ SCOPED_TRACE("Secondary Locked");
+ TestLauncherAlignment(root_windows[1], SHELF_ALIGNMENT_LOCKED,
+ "300,0 500x453");
+ }
+ {
SCOPED_TRACE("Secondary Right");
TestLauncherAlignment(root_windows[1],
SHELF_ALIGNMENT_RIGHT,
@@ -447,4 +462,11 @@ TEST_F(ShelfWidgetTestWithDelegate, CreateAutoHideAlwaysHideShelf) {
SHELF_AUTO_HIDE_HIDDEN);
}
+TEST_F(ShelfWidgetTestWithDelegate, CreateLockedShelf) {
+ // The auto hide state 'HIDDEN' is returned for any non-auto-hide behavior.
+ TestCreateShelfWithInitialValues(SHELF_ALIGNMENT_LOCKED,
+ SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
+ SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
+}
+
} // namespace ash
« ash/shelf/shelf_types.h ('K') | « ash/shelf/shelf_widget.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698