| 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/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
| 9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
| 10 #include "ash/wm/workspace/snap_sizer.h" | 10 #include "ash/wm/workspace/snap_sizer.h" |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 generator.GestureScrollSequence(location, end, | 455 generator.GestureScrollSequence(location, end, |
| 456 base::TimeDelta::FromMilliseconds(5), | 456 base::TimeDelta::FromMilliseconds(5), |
| 457 10); | 457 10); |
| 458 RunAllPendingInMessageLoop(); | 458 RunAllPendingInMessageLoop(); |
| 459 EXPECT_NE(old_bounds.ToString(), target->bounds().ToString()); | 459 EXPECT_NE(old_bounds.ToString(), target->bounds().ToString()); |
| 460 EXPECT_TRUE(wm::IsWindowMinimized(target.get())); | 460 EXPECT_TRUE(wm::IsWindowMinimized(target.get())); |
| 461 } | 461 } |
| 462 | 462 |
| 463 // Verifies pressing escape resets the bounds to the original bounds. | 463 // Verifies pressing escape resets the bounds to the original bounds. |
| 464 #if defined(OS_MACOSX) | 464 #if defined(OS_MACOSX) |
| 465 #define MAYBE_EscapeReverts FAILS_EscapeReverts | 465 #define MAYBE_EscapeReverts DISABLED_EscapeReverts |
| 466 #else | 466 #else |
| 467 #define MAYBE_EscapeReverts EscapeReverts | 467 #define MAYBE_EscapeReverts EscapeReverts |
| 468 #endif | 468 #endif |
| 469 TEST_F(ToplevelWindowEventHandlerTest, MAYBE_EscapeReverts) { | 469 TEST_F(ToplevelWindowEventHandlerTest, MAYBE_EscapeReverts) { |
| 470 aura::RootWindow* root = Shell::GetPrimaryRootWindow(); | 470 aura::RootWindow* root = Shell::GetPrimaryRootWindow(); |
| 471 aura::client::ActivationClient* original_client = | 471 aura::client::ActivationClient* original_client = |
| 472 aura::client::GetActivationClient(root); | 472 aura::client::GetActivationClient(root); |
| 473 aura::test::TestActivationClient activation_client(root); | 473 aura::test::TestActivationClient activation_client(root); |
| 474 scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOMRIGHT)); | 474 scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOMRIGHT)); |
| 475 target->Focus(); | 475 target->Focus(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 | 526 |
| 527 generator.PressLeftButton(); | 527 generator.PressLeftButton(); |
| 528 generator.MoveMouseBy(10, 11); | 528 generator.MoveMouseBy(10, 11); |
| 529 RunAllPendingInMessageLoop(); | 529 RunAllPendingInMessageLoop(); |
| 530 EXPECT_EQ("10,11 100x100", target->bounds().ToString()); | 530 EXPECT_EQ("10,11 100x100", target->bounds().ToString()); |
| 531 } | 531 } |
| 532 } | 532 } |
| 533 | 533 |
| 534 } // namespace test | 534 } // namespace test |
| 535 } // namespace ash | 535 } // namespace ash |
| OLD | NEW |