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

Unified Diff: ash/extended_desktop_unittest.cc

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/drag_drop/drag_drop_controller_unittest.cc ('k') | ash/magnifier/magnification_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/extended_desktop_unittest.cc
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc
index 4276b5d0394b6b548a018c1a483fc0da77b7cd48..600cdef9b335bb9e3b2dd0e2b129b9f3d8369e99 100644
--- a/ash/extended_desktop_unittest.cc
+++ b/ash/extended_desktop_unittest.cc
@@ -252,15 +252,13 @@ TEST_F(ExtendedDesktopTest, TestCursor) {
UpdateDisplay("1000x600,600x400");
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
- aura::WindowEventDispatcher* dispatcher0 = root_windows[0]->GetDispatcher();
- aura::WindowEventDispatcher* dispatcher1 = root_windows[1]->GetDispatcher();
- EXPECT_EQ(ui::kCursorPointer,
- dispatcher0->host()->last_cursor().native_type());
- EXPECT_EQ(ui::kCursorPointer,
- dispatcher1->host()->last_cursor().native_type());
+ aura::WindowTreeHost* host0 = root_windows[0]->GetHost();
+ aura::WindowTreeHost* host1 = root_windows[1]->GetHost();
+ EXPECT_EQ(ui::kCursorPointer, host0->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorPointer, host1->last_cursor().native_type());
Shell::GetInstance()->cursor_manager()->SetCursor(ui::kCursorCopy);
- EXPECT_EQ(ui::kCursorCopy, dispatcher0->host()->last_cursor().native_type());
- EXPECT_EQ(ui::kCursorCopy, dispatcher1->host()->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorCopy, host0->last_cursor().native_type());
+ EXPECT_EQ(ui::kCursorCopy, host1->last_cursor().native_type());
}
TEST_F(ExtendedDesktopTest, TestCursorLocation) {
@@ -790,13 +788,15 @@ TEST_F(ExtendedDesktopTest, KeyEventsOnLockScreen) {
// The lock window should get events on both root windows.
aura::test::EventGenerator& event_generator(GetEventGenerator());
- event_generator.set_current_dispatcher(root_windows[0]->GetDispatcher());
+ event_generator.set_current_dispatcher(
+ root_windows[0]->GetHost()->dispatcher());
event_generator.PressKey(ui::VKEY_A, 0);
event_generator.ReleaseKey(ui::VKEY_A, 0);
EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow());
EXPECT_EQ("a", UTF16ToASCII(textfield->text()));
- event_generator.set_current_dispatcher(root_windows[1]->GetDispatcher());
+ event_generator.set_current_dispatcher(
+ root_windows[1]->GetHost()->dispatcher());
event_generator.PressKey(ui::VKEY_B, 0);
event_generator.ReleaseKey(ui::VKEY_B, 0);
EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow());
@@ -813,13 +813,15 @@ TEST_F(ExtendedDesktopTest, KeyEventsOnLockScreen) {
// on both root windows.
UpdateDisplay("100x100,200x200");
root_windows = Shell::GetAllRootWindows();
- event_generator.set_current_dispatcher(root_windows[0]->GetDispatcher());
+ event_generator.set_current_dispatcher(
+ root_windows[0]->GetHost()->dispatcher());
event_generator.PressKey(ui::VKEY_D, 0);
event_generator.ReleaseKey(ui::VKEY_D, 0);
EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow());
EXPECT_EQ("abcd", UTF16ToASCII(textfield->text()));
- event_generator.set_current_dispatcher(root_windows[1]->GetDispatcher());
+ event_generator.set_current_dispatcher(
+ root_windows[1]->GetHost()->dispatcher());
event_generator.PressKey(ui::VKEY_E, 0);
event_generator.ReleaseKey(ui::VKEY_E, 0);
EXPECT_EQ(lock_widget->GetNativeView(), focus_client->GetFocusedWindow());
« no previous file with comments | « ash/drag_drop/drag_drop_controller_unittest.cc ('k') | ash/magnifier/magnification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698