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

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: Update and cleanup tests. 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
« no previous file with comments | « ash/shelf/shelf_widget.cc ('k') | ash/shell.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 c1f778062f5cc3e90c8aee333a79e0eed7482b91..b596bc0cf3ec3c62e1f85512e8b777f3dc3c83ec 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_BOTTOM_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_BOTTOM_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_BOTTOM_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_BOTTOM_LOCKED,
+ SHELF_AUTO_HIDE_BEHAVIOR_NEVER,
+ SHELF_VISIBLE, SHELF_AUTO_HIDE_HIDDEN);
+}
+
} // namespace ash
« no previous file with comments | « ash/shelf/shelf_widget.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698