| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 261 |
| 262 ASSERT_EQ(1u, display_manager()->displays().size()); | 262 ASSERT_EQ(1u, display_manager()->displays().size()); |
| 263 Display* display = display_manager()->GetDisplayById(display_id); | 263 Display* display = display_manager()->GetDisplayById(display_id); |
| 264 WindowManagerState* active_wms = | 264 WindowManagerState* active_wms = |
| 265 display->GetActiveWindowManagerDisplayRoot()->window_manager_state(); | 265 display->GetActiveWindowManagerDisplayRoot()->window_manager_state(); |
| 266 ASSERT_TRUE(active_wms); | 266 ASSERT_TRUE(active_wms); |
| 267 EXPECT_EQ(kTestId1, active_wms->user_id()); | 267 EXPECT_EQ(kTestId1, active_wms->user_id()); |
| 268 | 268 |
| 269 ui::PointerEvent pointer_event(ui::MouseEvent( | 269 ui::PointerEvent pointer_event(ui::MouseEvent( |
| 270 ui::ET_MOUSE_PRESSED, gfx::Point(20, 25), gfx::Point(20, 25), | 270 ui::ET_MOUSE_PRESSED, gfx::Point(20, 25), gfx::Point(20, 25), |
| 271 base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); | 271 base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON, |
| 272 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE))); |
| 272 ignore_result(static_cast<PlatformDisplayDelegate*>(display) | 273 ignore_result(static_cast<PlatformDisplayDelegate*>(display) |
| 273 ->GetEventSink() | 274 ->GetEventSink() |
| 274 ->OnEventFromSource(&pointer_event)); | 275 ->OnEventFromSource(&pointer_event)); |
| 275 | 276 |
| 276 EXPECT_TRUE(EventDispatcherTestApi(active_wms->event_dispatcher()) | 277 EXPECT_TRUE(EventDispatcherTestApi(active_wms->event_dispatcher()) |
| 277 .AreAnyPointersDown()); | 278 .AreAnyPointersDown()); |
| 278 EXPECT_EQ(gfx::Point(20, 25), | 279 EXPECT_EQ(gfx::Point(20, 25), |
| 279 active_wms->event_dispatcher()->mouse_pointer_last_location()); | 280 active_wms->event_dispatcher()->mouse_pointer_last_location()); |
| 280 | 281 |
| 281 // Switch the user. Should trigger resetting state in old event dispatcher | 282 // Switch the user. Should trigger resetting state in old event dispatcher |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 ASSERT_EQ(0u, tree_client->tracker()->changes()->size()); | 425 ASSERT_EQ(0u, tree_client->tracker()->changes()->size()); |
| 425 | 426 |
| 426 // The window should be destroyed when the client says so. | 427 // The window should be destroyed when the client says so. |
| 427 ASSERT_TRUE(tree->DeleteWindow(secondary_root_id)); | 428 ASSERT_TRUE(tree->DeleteWindow(secondary_root_id)); |
| 428 EXPECT_TRUE(secondary_root_destroyed); | 429 EXPECT_TRUE(secondary_root_destroyed); |
| 429 } | 430 } |
| 430 | 431 |
| 431 } // namespace test | 432 } // namespace test |
| 432 } // namespace ws | 433 } // namespace ws |
| 433 } // namespace ui | 434 } // namespace ui |
| OLD | NEW |