| 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/toplevel_window_event_handler.h" | 5 #include "ash/wm/toplevel_window_event_handler.h" |
| 6 | 6 |
| 7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
| 10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 TEST_F(ToplevelWindowEventHandlerTest, RunMoveLoopFailsDuringInProgressDrag) { | 717 TEST_F(ToplevelWindowEventHandlerTest, RunMoveLoopFailsDuringInProgressDrag) { |
| 718 scoped_ptr<aura::Window> window1(CreateWindow(HTCAPTION)); | 718 scoped_ptr<aura::Window> window1(CreateWindow(HTCAPTION)); |
| 719 EXPECT_EQ("0,0 100x100", window1->bounds().ToString()); | 719 EXPECT_EQ("0,0 100x100", window1->bounds().ToString()); |
| 720 scoped_ptr<aura::Window> window2(CreateWindow(HTCAPTION)); | 720 scoped_ptr<aura::Window> window2(CreateWindow(HTCAPTION)); |
| 721 | 721 |
| 722 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), | 722 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), |
| 723 window1.get()); | 723 window1.get()); |
| 724 window1->Focus(); | 724 window1->Focus(); |
| 725 generator.PressLeftButton(); | 725 generator.PressLeftButton(); |
| 726 generator.MoveMouseBy(10, 11); | 726 generator.MoveMouseBy(10, 11); |
| 727 RunAllPendingInMessageLoop(); | 727 EXPECT_EQ("10,11 100x100", window1->bounds().ToString()); |
| 728 | 728 |
| 729 aura::client::WindowMoveClient* move_client = | 729 aura::client::WindowMoveClient* move_client = |
| 730 aura::client::GetWindowMoveClient(window2->GetRootWindow()); | 730 aura::client::GetWindowMoveClient(window2->GetRootWindow()); |
| 731 EXPECT_EQ(aura::client::MOVE_CANCELED, | 731 EXPECT_EQ(aura::client::MOVE_CANCELED, |
| 732 move_client->RunMoveLoop(window2.get(), gfx::Vector2d(), | 732 move_client->RunMoveLoop(window2.get(), gfx::Vector2d(), |
| 733 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); | 733 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); |
| 734 | 734 |
| 735 generator.ReleaseLeftButton(); | 735 generator.ReleaseLeftButton(); |
| 736 RunAllPendingInMessageLoop(); | |
| 737 EXPECT_EQ("10,11 100x100", window1->bounds().ToString()); | 736 EXPECT_EQ("10,11 100x100", window1->bounds().ToString()); |
| 738 } | 737 } |
| 739 | 738 |
| 740 // Showing the resize shadows when the mouse is over the window edges is tested | 739 // Showing the resize shadows when the mouse is over the window edges is tested |
| 741 // in resize_shadow_and_cursor_test.cc | 740 // in resize_shadow_and_cursor_test.cc |
| 742 | 741 |
| 743 } // namespace test | 742 } // namespace test |
| 744 } // namespace ash | 743 } // namespace ash |
| OLD | NEW |