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

Unified Diff: ash/wm/dock/docked_window_resizer_unittest.cc

Issue 173843003: Avoids minimizing docked window in a unit test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_resizer_unittest.cc
diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc
index 2e51b2004bc732b450e782dd9145f9b25c3e223b..d51c56a8791a4886fd5a4cc93ba5040edc91d979 100644
--- a/ash/wm/dock/docked_window_resizer_unittest.cc
+++ b/ash/wm/dock/docked_window_resizer_unittest.cc
@@ -545,12 +545,17 @@ TEST_P(DockedWindowResizerTest, AttachMaximize) {
TEST_P(DockedWindowResizerTest, AttachTwoWindows) {
if (!SupportsHostWindowResize())
return;
+ UpdateDisplay("600x600");
scoped_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
scoped_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w2.get(), 50);
+ // Docking second window should not minimize the first.
+ wm::WindowState* window_state1 = wm::GetWindowState(w1.get());
+ EXPECT_FALSE(window_state1->IsMinimized());
+
// Both windows should be docked at the right edge.
EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(),
w1->GetBoundsInScreen().right());
@@ -569,6 +574,7 @@ TEST_P(DockedWindowResizerTest, AttachTwoWindows) {
DragEnd();
// The first window should be still docked.
+ EXPECT_FALSE(window_state1->IsMinimized());
EXPECT_EQ(w1->GetRootWindow()->GetBoundsInScreen().right(),
w1->GetBoundsInScreen().right());
EXPECT_EQ(internal::kShellWindowId_DockedContainer, w1->parent()->id());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698