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

Unified Diff: ash/wm/shelf_layout_manager_unittest.cc

Issue 10384217: Add left/right layout support for uber tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: UpdateWidgetSize when layout manager is changed for systemtray and add test. Created 8 years, 7 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/wm/shelf_layout_manager.cc ('k') | ash/wm/status_area_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/shelf_layout_manager_unittest.cc
diff --git a/ash/wm/shelf_layout_manager_unittest.cc b/ash/wm/shelf_layout_manager_unittest.cc
index f59cb732cbf8058b7c6d53adafb3c477b828db12..2853e98d01a5afa57df972909486e9490b4ef825 100644
--- a/ash/wm/shelf_layout_manager_unittest.cc
+++ b/ash/wm/shelf_layout_manager_unittest.cc
@@ -10,6 +10,7 @@
#include "ash/shell.h"
#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
+#include "ash/system/tray/system_tray.h"
#include "ash/test/ash_test_base.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
@@ -507,6 +508,11 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
EXPECT_GE(
launcher_bounds.width(),
shelf->launcher_widget()->GetContentsView()->GetPreferredSize().width());
+ EXPECT_EQ(SHELF_ALIGNMENT_LEFT,
+ Shell::GetInstance()->tray()->shelf_alignment());
+ gfx::Rect status_bounds(shelf->status()->GetWindowScreenBounds());
+ EXPECT_GE(status_bounds.width(),
+ shelf->status()->GetContentsView()->GetPreferredSize().width());
EXPECT_EQ(shelf->GetIdealBounds().width(),
monitor.GetWorkAreaInsets().left());
EXPECT_EQ(0, monitor.GetWorkAreaInsets().top());
@@ -516,7 +522,6 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
EXPECT_EQ(monitor.bounds().y(), launcher_bounds.y());
EXPECT_EQ(monitor.bounds().height(), launcher_bounds.height());
-
shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT);
launcher_bounds = shelf->launcher_widget()->GetWindowScreenBounds();
monitor = manager->GetMonitorNearestWindow(Shell::GetRootWindow());
@@ -526,6 +531,11 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
EXPECT_GE(
launcher_bounds.width(),
shelf->launcher_widget()->GetContentsView()->GetPreferredSize().width());
+ EXPECT_EQ(SHELF_ALIGNMENT_RIGHT,
+ Shell::GetInstance()->tray()->shelf_alignment());
+ status_bounds = gfx::Rect(shelf->status()->GetWindowScreenBounds());
+ EXPECT_GE(status_bounds.width(),
+ shelf->status()->GetContentsView()->GetPreferredSize().width());
EXPECT_EQ(shelf->GetIdealBounds().width(),
monitor.GetWorkAreaInsets().right());
EXPECT_EQ(0, monitor.GetWorkAreaInsets().top());
« no previous file with comments | « ash/wm/shelf_layout_manager.cc ('k') | ash/wm/status_area_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698