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

Unified Diff: ash/wm/workspace/workspace_layout_manager_unittest.cc

Issue 2165693002: Fix tests in when MD is set to EXPERIMENTAL by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 5 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/wm/workspace/workspace_layout_manager_unittest.cc
diff --git a/ash/wm/workspace/workspace_layout_manager_unittest.cc b/ash/wm/workspace/workspace_layout_manager_unittest.cc
index 602a91b2a39e92f0b45e200d1f4287d9650ea343..a1c239810319f12909e75811413aaf5f9f4409af 100644
--- a/ash/wm/workspace/workspace_layout_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_layout_manager_unittest.cc
@@ -9,6 +9,7 @@
#include "ash/aura/wm_window_aura.h"
#include "ash/common/session/session_state_delegate.h"
+#include "ash/common/shelf/shelf_constants.h"
#include "ash/common/shell_observer.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/wm/maximize_mode/workspace_backdrop_delegate.h"
@@ -223,7 +224,9 @@ TEST_F(WorkspaceLayoutManagerTest, MaximizeInDisplayToBeRestored) {
// is inside 2nd display.
window_state->Maximize();
EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ("300,0 400x453", window->GetBoundsInScreen().ToString());
+ EXPECT_EQ(
+ gfx::Rect(300, 0, 400, 500 - GetShelfConstant(SHELF_SIZE)).ToString(),
+ window->GetBoundsInScreen().ToString());
window_state->Restore();
EXPECT_EQ(root_windows[1], window->GetRootWindow());
@@ -234,7 +237,9 @@ TEST_F(WorkspaceLayoutManagerTest, MaximizeInDisplayToBeRestored) {
window_state->SetRestoreBoundsInScreen(gfx::Rect(295, 0, 30, 40));
window_state->Maximize();
EXPECT_EQ(root_windows[1], window->GetRootWindow());
- EXPECT_EQ("300,0 400x453", window->GetBoundsInScreen().ToString());
+ EXPECT_EQ(
+ gfx::Rect(300, 0, 400, 500 - GetShelfConstant(SHELF_SIZE)).ToString(),
+ window->GetBoundsInScreen().ToString());
window_state->Restore();
EXPECT_EQ(root_windows[1], window->GetRootWindow());
@@ -250,7 +255,9 @@ TEST_F(WorkspaceLayoutManagerTest, MaximizeInDisplayToBeRestored) {
w1->Show();
EXPECT_TRUE(w1->IsMaximized());
EXPECT_EQ(root_windows[1], w1->GetNativeView()->GetRootWindow());
- EXPECT_EQ("300,0 400x453", w1->GetWindowBoundsInScreen().ToString());
+ EXPECT_EQ(
+ gfx::Rect(300, 0, 400, 500 - GetShelfConstant(SHELF_SIZE)).ToString(),
+ w1->GetWindowBoundsInScreen().ToString());
w1->Restore();
EXPECT_EQ(root_windows[1], w1->GetNativeView()->GetRootWindow());
EXPECT_EQ("400,0 30x40", w1->GetWindowBoundsInScreen().ToString());

Powered by Google App Engine
This is Rietveld 408576698