OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/workspace/workspace_window_resizer.h" | 5 #include "ash/wm/workspace/workspace_window_resizer.h" |
6 | 6 |
7 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "ash/wm/property_util.h" | 10 #include "ash/wm/property_util.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 resizer->Drag(CalculateDragPoint(*resizer, 800, 20), 0); | 335 resizer->Drag(CalculateDragPoint(*resizer, 800, 20), 0); |
336 resizer->RevertDrag(); | 336 resizer->RevertDrag(); |
337 EXPECT_EQ("0,50 400x200", window_->bounds().ToString()); | 337 EXPECT_EQ("0,50 400x200", window_->bounds().ToString()); |
338 EXPECT_EQ("0,250 200x100", window2_->bounds().ToString()); | 338 EXPECT_EQ("0,250 200x100", window2_->bounds().ToString()); |
339 } | 339 } |
340 | 340 |
341 // Assertions around attached window resize dragging from the bottom with 3 | 341 // Assertions around attached window resize dragging from the bottom with 3 |
342 // windows. | 342 // windows. |
343 // TODO(oshima): Host window doesn't get a resize event after | 343 // TODO(oshima): Host window doesn't get a resize event after |
344 // SetHostSize on Windows trybot, which gives wrong work/display area. | 344 // SetHostSize on Windows trybot, which gives wrong work/display area. |
345 TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3) { | 345 // crbug.com/141577. |
| 346 #if defined(OS_WIN) |
| 347 #define MAYBE_AttachedResize_BOTTOM_3 DISABLED_AttachedResize_BOTTOM_3 |
| 348 #else |
| 349 #define MAYBE_AttachedResize_BOTTOM_3 AttachedResize_BOTTOM_3 |
| 350 #endif |
| 351 TEST_F(WorkspaceWindowResizerTest, MAYBE_AttachedResize_BOTTOM_3) { |
346 aura::RootWindow* root = Shell::GetPrimaryRootWindow(); | 352 aura::RootWindow* root = Shell::GetPrimaryRootWindow(); |
347 root->SetHostSize(gfx::Size(600, 800)); | 353 root->SetHostSize(gfx::Size(600, 800)); |
348 LOG(ERROR) << "=== Calling OnHostResized, 600x800"; | |
349 | 354 |
350 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); | 355 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
351 | 356 |
352 window_->SetBounds(gfx::Rect( 300, 100, 300, 200)); | 357 window_->SetBounds(gfx::Rect( 300, 100, 300, 200)); |
353 window2_->SetBounds(gfx::Rect(300, 300, 200, 150)); | 358 window2_->SetBounds(gfx::Rect(300, 300, 200, 150)); |
354 window3_->SetBounds(gfx::Rect(300, 450, 200, 100)); | 359 window3_->SetBounds(gfx::Rect(300, 450, 200, 100)); |
355 delegate2_.set_min_size(gfx::Size(50, 52)); | 360 delegate2_.set_min_size(gfx::Size(50, 52)); |
356 delegate3_.set_min_size(gfx::Size(50, 38)); | 361 delegate3_.set_min_size(gfx::Size(50, 38)); |
357 | 362 |
358 std::vector<aura::Window*> windows; | 363 std::vector<aura::Window*> windows; |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 // Ctrl + drag the window to new poistion by adding (10, 12) to its origin, | 651 // Ctrl + drag the window to new poistion by adding (10, 12) to its origin, |
647 // the window should move to the exact position. | 652 // the window should move to the exact position. |
648 resizer->Drag(CalculateDragPoint(*resizer, 10, 12), 0); | 653 resizer->Drag(CalculateDragPoint(*resizer, 10, 12), 0); |
649 resizer->CompleteDrag(ui::EF_CONTROL_DOWN); | 654 resizer->CompleteDrag(ui::EF_CONTROL_DOWN); |
650 EXPECT_EQ("106,124 320x160", window_->bounds().ToString()); | 655 EXPECT_EQ("106,124 320x160", window_->bounds().ToString()); |
651 } | 656 } |
652 | 657 |
653 } // namespace | 658 } // namespace |
654 } // namespace test | 659 } // namespace test |
655 } // namespace ash | 660 } // namespace ash |
OLD | NEW |