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

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

Issue 126513004: Rename RootWindowHost to WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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/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/window_state.h" 10 #include "ash/wm/window_state.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 EXPECT_FALSE(window_state->IsMaximized()); 267 EXPECT_FALSE(window_state->IsMaximized());
268 EXPECT_EQ("1,2 30x40", window->bounds().ToString()); 268 EXPECT_EQ("1,2 30x40", window->bounds().ToString());
269 269
270 // Double-clicking the middle button shouldn't toggle the maximized state. 270 // Double-clicking the middle button shouldn't toggle the maximized state.
271 WindowPropertyObserver observer(window.get()); 271 WindowPropertyObserver observer(window.get());
272 ui::MouseEvent press(ui::ET_MOUSE_PRESSED, generator.current_location(), 272 ui::MouseEvent press(ui::ET_MOUSE_PRESSED, generator.current_location(),
273 generator.current_location(), 273 generator.current_location(),
274 ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_IS_DOUBLE_CLICK, 274 ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_IS_DOUBLE_CLICK,
275 ui::EF_MIDDLE_MOUSE_BUTTON); 275 ui::EF_MIDDLE_MOUSE_BUTTON);
276 aura::WindowEventDispatcher* dispatcher = root->GetDispatcher(); 276 aura::WindowEventDispatcher* dispatcher = root->GetDispatcher();
277 dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&press); 277 dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&press);
278 ui::MouseEvent release(ui::ET_MOUSE_RELEASED, generator.current_location(), 278 ui::MouseEvent release(ui::ET_MOUSE_RELEASED, generator.current_location(),
279 generator.current_location(), 279 generator.current_location(),
280 ui::EF_IS_DOUBLE_CLICK, 280 ui::EF_IS_DOUBLE_CLICK,
281 ui::EF_MIDDLE_MOUSE_BUTTON); 281 ui::EF_MIDDLE_MOUSE_BUTTON);
282 dispatcher->AsRootWindowHostDelegate()->OnHostMouseEvent(&release); 282 dispatcher->AsWindowTreeHostDelegate()->OnHostMouseEvent(&release);
283 283
284 EXPECT_FALSE(window_state->IsMaximized()); 284 EXPECT_FALSE(window_state->IsMaximized());
285 EXPECT_EQ("1,2 30x40", window->bounds().ToString()); 285 EXPECT_EQ("1,2 30x40", window->bounds().ToString());
286 EXPECT_FALSE(observer.DidPropertyChange(aura::client::kShowStateKey)); 286 EXPECT_FALSE(observer.DidPropertyChange(aura::client::kShowStateKey));
287 } 287 }
288 288
289 TEST_F(WorkspaceEventHandlerTest, DoubleTapCaptionTogglesMaximize) { 289 TEST_F(WorkspaceEventHandlerTest, DoubleTapCaptionTogglesMaximize) {
290 aura::test::TestWindowDelegate wd; 290 aura::test::TestWindowDelegate wd;
291 gfx::Rect bounds(10, 20, 30, 40); 291 gfx::Rect bounds(10, 20, 30, 40);
292 scoped_ptr<aura::Window> window(CreateTestWindow(&wd, bounds)); 292 scoped_ptr<aura::Window> window(CreateTestWindow(&wd, bounds));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->parent())); 341 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->parent()));
342 base::MessageLoop::current()->DeleteSoon(FROM_HERE, window.get()); 342 base::MessageLoop::current()->DeleteSoon(FROM_HERE, window.get());
343 aura::client::GetWindowMoveClient(window->parent()) 343 aura::client::GetWindowMoveClient(window->parent())
344 ->RunMoveLoop(window.release(), 344 ->RunMoveLoop(window.release(),
345 gfx::Vector2d(), 345 gfx::Vector2d(),
346 aura::client::WINDOW_MOVE_SOURCE_MOUSE); 346 aura::client::WINDOW_MOVE_SOURCE_MOUSE);
347 } 347 }
348 348
349 } // namespace internal 349 } // namespace internal
350 } // namespace ash 350 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | chrome/browser/chromeos/input_method/input_method_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698