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

Unified Diff: ash/system/tray/system_tray_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/system/tray/system_tray.cc ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray_unittest.cc
diff --git a/ash/system/tray/system_tray_unittest.cc b/ash/system/tray/system_tray_unittest.cc
index 30c2b120defbbe5b867e04906cad37cbf94f8f77..ac972887de2c1164b940ddf822e4cf252abcdd28 100644
--- a/ash/system/tray/system_tray_unittest.cc
+++ b/ash/system/tray/system_tray_unittest.cc
@@ -365,6 +365,15 @@ TEST_F(SystemTrayTest, TrayBoundsInWidget) {
EXPECT_TRUE(window_bounds.x() >= tray_bounds.x());
EXPECT_TRUE(window_bounds.y() >= tray_bounds.y());
+ // Test in locked alignment.
+ manager->SetAlignment(SHELF_ALIGNMENT_BOTTOM_LOCKED);
+ window_bounds = widget->GetWindowBoundsInScreen();
+ tray_bounds = tray->GetBoundsInScreen();
+ EXPECT_TRUE(window_bounds.bottom() >= tray_bounds.bottom());
+ EXPECT_TRUE(window_bounds.right() >= tray_bounds.right());
+ EXPECT_TRUE(window_bounds.x() >= tray_bounds.x());
+ EXPECT_TRUE(window_bounds.y() >= tray_bounds.y());
+
// Test in the left alignment.
manager->SetAlignment(SHELF_ALIGNMENT_LEFT);
window_bounds = widget->GetWindowBoundsInScreen();
« no previous file with comments | « ash/system/tray/system_tray.cc ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698