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

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

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | chrome/browser/chrome_plugin_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_util.h" 7 #include "ash/screen_util.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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 window->SetProperty(aura::client::kCanMaximizeKey, true); 369 window->SetProperty(aura::client::kCanMaximizeKey, true);
370 wd.set_window_component(HTCAPTION); 370 wd.set_window_component(HTCAPTION);
371 aura::Window* root = Shell::GetPrimaryRootWindow(); 371 aura::Window* root = Shell::GetPrimaryRootWindow();
372 aura::test::EventGenerator generator(root, window.get()); 372 aura::test::EventGenerator generator(root, window.get());
373 373
374 WindowPropertyObserver observer(window.get()); 374 WindowPropertyObserver observer(window.get());
375 ui::MouseEvent press(ui::ET_MOUSE_PRESSED, generator.current_location(), 375 ui::MouseEvent press(ui::ET_MOUSE_PRESSED, generator.current_location(),
376 generator.current_location(), 376 generator.current_location(),
377 ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_IS_DOUBLE_CLICK, 377 ui::EF_MIDDLE_MOUSE_BUTTON | ui::EF_IS_DOUBLE_CLICK,
378 ui::EF_MIDDLE_MOUSE_BUTTON); 378 ui::EF_MIDDLE_MOUSE_BUTTON);
379 aura::WindowEventDispatcher* dispatcher = root->GetDispatcher(); 379 aura::WindowEventDispatcher* dispatcher = root->GetHost()->dispatcher();
380 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&press); 380 ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&press);
381 ASSERT_FALSE(details.dispatcher_destroyed); 381 ASSERT_FALSE(details.dispatcher_destroyed);
382 ui::MouseEvent release(ui::ET_MOUSE_RELEASED, generator.current_location(), 382 ui::MouseEvent release(ui::ET_MOUSE_RELEASED, generator.current_location(),
383 generator.current_location(), 383 generator.current_location(),
384 ui::EF_IS_DOUBLE_CLICK, 384 ui::EF_IS_DOUBLE_CLICK,
385 ui::EF_MIDDLE_MOUSE_BUTTON); 385 ui::EF_MIDDLE_MOUSE_BUTTON);
386 details = dispatcher->OnEventFromSource(&release); 386 details = dispatcher->OnEventFromSource(&release);
387 ASSERT_FALSE(details.dispatcher_destroyed); 387 ASSERT_FALSE(details.dispatcher_destroyed);
388 388
389 EXPECT_FALSE(wm::GetWindowState(window.get())->IsMaximized()); 389 EXPECT_FALSE(wm::GetWindowState(window.get())->IsMaximized());
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->GetRootWindow())); 446 ASSERT_TRUE(aura::client::GetWindowMoveClient(window->GetRootWindow()));
447 base::MessageLoop::current()->DeleteSoon(FROM_HERE, window.get()); 447 base::MessageLoop::current()->DeleteSoon(FROM_HERE, window.get());
448 aura::client::GetWindowMoveClient(window->GetRootWindow()) 448 aura::client::GetWindowMoveClient(window->GetRootWindow())
449 ->RunMoveLoop(window.release(), 449 ->RunMoveLoop(window.release(),
450 gfx::Vector2d(), 450 gfx::Vector2d(),
451 aura::client::WINDOW_MOVE_SOURCE_MOUSE); 451 aura::client::WINDOW_MOVE_SOURCE_MOUSE);
452 } 452 }
453 453
454 } // namespace internal 454 } // namespace internal
455 } // namespace ash 455 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | chrome/browser/chrome_plugin_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698