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

Side by Side Diff: ash/wm/toplevel_window_event_handler_unittest.cc

Issue 10909043: Cancel drag if display configuration changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 TEST_F(ToplevelWindowEventHandlerTest, MAYBE_EscapeReverts) { 468 TEST_F(ToplevelWindowEventHandlerTest, MAYBE_EscapeReverts) {
469 aura::RootWindow* root = Shell::GetPrimaryRootWindow(); 469 aura::RootWindow* root = Shell::GetPrimaryRootWindow();
470 aura::client::ActivationClient* original_client = 470 aura::client::ActivationClient* original_client =
471 aura::client::GetActivationClient(root); 471 aura::client::GetActivationClient(root);
472 aura::test::TestActivationClient activation_client(root); 472 aura::test::TestActivationClient activation_client(root);
473 scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOMRIGHT)); 473 scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOMRIGHT));
474 target->Focus(); 474 target->Focus();
475 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), 475 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
476 target.get()); 476 target.get());
477 generator.PressLeftButton(); 477 generator.PressLeftButton();
478 generator.MoveMouseTo(generator.current_location().Add(gfx::Point(10, 11))); 478 generator.MoveMouseBy(10, 11);
479 479
480 // Execute any scheduled draws so that pending mouse events are processed. 480 // Execute any scheduled draws so that pending mouse events are processed.
481 RunAllPendingInMessageLoop(); 481 RunAllPendingInMessageLoop();
482 482
483 EXPECT_EQ("0,0 110x111", target->bounds().ToString()); 483 EXPECT_EQ("0,0 110x111", target->bounds().ToString());
484 generator.PressKey(ui::VKEY_ESCAPE, 0); 484 generator.PressKey(ui::VKEY_ESCAPE, 0);
485 generator.ReleaseKey(ui::VKEY_ESCAPE, 0); 485 generator.ReleaseKey(ui::VKEY_ESCAPE, 0);
486 EXPECT_EQ("0,0 100x100", target->bounds().ToString()); 486 EXPECT_EQ("0,0 100x100", target->bounds().ToString());
487 aura::client::SetActivationClient(root, original_client); 487 aura::client::SetActivationClient(root, original_client);
488 } 488 }
489 489
490 } // namespace test 490 } // namespace test
491 } // namespace ash 491 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/toplevel_window_event_handler.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698