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

Side by Side Diff: ash/wm/workspace/workspace_event_handler_unittest.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 years, 2 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/workspace/workspace_event_handler.h" 5 #include "ash/wm/workspace/workspace_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/property_util.h" 9 #include "ash/wm/property_util.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) { 44 TEST_F(WorkspaceEventHandlerTest, DoubleClickSingleAxisResizeEdge) {
45 // Double clicking the vertical resize edge of a window should maximize it 45 // Double clicking the vertical resize edge of a window should maximize it
46 // vertically. 46 // vertically.
47 gfx::Rect restored_bounds(10, 10, 50, 50); 47 gfx::Rect restored_bounds(10, 10, 50, 50);
48 aura::test::TestWindowDelegate wd; 48 aura::test::TestWindowDelegate wd;
49 scoped_ptr<aura::Window> window(CreateTestWindow(&wd, restored_bounds)); 49 scoped_ptr<aura::Window> window(CreateTestWindow(&wd, restored_bounds));
50 50
51 wm::ActivateWindow(window.get()); 51 wm::ActivateWindow(window.get());
52 52
53 gfx::Rect work_area = 53 gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
54 gfx::Screen::GetDisplayNearestWindow(window.get()).work_area(); 54 window.get()).work_area();
55 55
56 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), 56 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
57 window.get()); 57 window.get());
58 58
59 // Double-click the top resize edge. 59 // Double-click the top resize edge.
60 wd.set_window_component(HTTOP); 60 wd.set_window_component(HTTOP);
61 // On X a double click actually generates a drag between each press/release. 61 // On X a double click actually generates a drag between each press/release.
62 // Explicitly trigger this path since we had bugs in dealing with it 62 // Explicitly trigger this path since we had bugs in dealing with it
63 // correctly. 63 // correctly.
64 generator.PressLeftButton(); 64 generator.PressLeftButton();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 wd.set_window_component(HTCAPTION); 166 wd.set_window_component(HTCAPTION);
167 167
168 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->parent())); 168 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->parent()));
169 MessageLoop::current()->DeleteSoon(FROM_HERE, window.get()); 169 MessageLoop::current()->DeleteSoon(FROM_HERE, window.get());
170 aura::client::GetWindowMoveClient(window->parent())->RunMoveLoop( 170 aura::client::GetWindowMoveClient(window->parent())->RunMoveLoop(
171 window.release(), gfx::Point()); 171 window.release(), gfx::Point());
172 } 172 }
173 173
174 } // namespace internal 174 } // namespace internal
175 } // namespace ash 175 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_event_handler.cc ('k') | ash/wm/workspace/workspace_manager2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698