| Index: ash/wm/window_manager_unittest.cc
|
| diff --git a/ash/wm/window_manager_unittest.cc b/ash/wm/window_manager_unittest.cc
|
| index 7d4936ca894bd2d20c79d66bb5727faff317f00c..766a4e9435899836ed5992c88da96152732ad611 100644
|
| --- a/ash/wm/window_manager_unittest.cc
|
| +++ b/ash/wm/window_manager_unittest.cc
|
| @@ -497,8 +497,9 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
| {
|
| // Resize edges and corners show proper cursors.
|
| window_delegate.set_hittest_code(HTBOTTOM);
|
| - ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1,
|
| - ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent move1(
|
| + ui::ET_MOUSE_MOVED, point1, point1, ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| ui::EventDispatchDetails details = sink->OnEventFromSource(&move1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(ui::kCursorSouthResize, host->last_cursor().native_type());
|
| @@ -506,8 +507,9 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
|
|
| {
|
| window_delegate.set_hittest_code(HTBOTTOMLEFT);
|
| - ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2,
|
| - ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent move2(
|
| + ui::ET_MOUSE_MOVED, point2, point2, ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| ui::EventDispatchDetails details = sink->OnEventFromSource(&move2);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(ui::kCursorSouthWestResize, host->last_cursor().native_type());
|
| @@ -515,8 +517,9 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
|
|
| {
|
| window_delegate.set_hittest_code(HTBOTTOMRIGHT);
|
| - ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1,
|
| - ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent move1(
|
| + ui::ET_MOUSE_MOVED, point1, point1, ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| ui::EventDispatchDetails details = sink->OnEventFromSource(&move1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(ui::kCursorSouthEastResize, host->last_cursor().native_type());
|
| @@ -524,8 +527,9 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
|
|
| {
|
| window_delegate.set_hittest_code(HTLEFT);
|
| - ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2,
|
| - ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent move2(
|
| + ui::ET_MOUSE_MOVED, point2, point2, ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| ui::EventDispatchDetails details = sink->OnEventFromSource(&move2);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(ui::kCursorWestResize, host->last_cursor().native_type());
|
| @@ -533,8 +537,9 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
|
|
| {
|
| window_delegate.set_hittest_code(HTRIGHT);
|
| - ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1,
|
| - ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent move1(
|
| + ui::ET_MOUSE_MOVED, point1, point1, ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| ui::EventDispatchDetails details = sink->OnEventFromSource(&move1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(ui::kCursorEastResize, host->last_cursor().native_type());
|
| @@ -542,8 +547,9 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
|
|
| {
|
| window_delegate.set_hittest_code(HTTOP);
|
| - ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2,
|
| - ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent move2(
|
| + ui::ET_MOUSE_MOVED, point2, point2, ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| ui::EventDispatchDetails details = sink->OnEventFromSource(&move2);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(ui::kCursorNorthResize, host->last_cursor().native_type());
|
| @@ -551,8 +557,9 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
|
|
| {
|
| window_delegate.set_hittest_code(HTTOPLEFT);
|
| - ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1,
|
| - ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent move1(
|
| + ui::ET_MOUSE_MOVED, point1, point1, ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| ui::EventDispatchDetails details = sink->OnEventFromSource(&move1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(ui::kCursorNorthWestResize, host->last_cursor().native_type());
|
| @@ -560,8 +567,9 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
|
|
| {
|
| window_delegate.set_hittest_code(HTTOPRIGHT);
|
| - ui::MouseEvent move2(ui::ET_MOUSE_MOVED, point2, point2,
|
| - ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent move2(
|
| + ui::ET_MOUSE_MOVED, point2, point2, ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| ui::EventDispatchDetails details = sink->OnEventFromSource(&move2);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(ui::kCursorNorthEastResize, host->last_cursor().native_type());
|
| @@ -570,8 +578,9 @@ TEST_F(WindowManagerTest, MouseEventCursors) {
|
| {
|
| // Client area uses null cursor.
|
| window_delegate.set_hittest_code(HTCLIENT);
|
| - ui::MouseEvent move1(ui::ET_MOUSE_MOVED, point1, point1,
|
| - ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent move1(
|
| + ui::ET_MOUSE_MOVED, point1, point1, ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| ui::EventDispatchDetails details = sink->OnEventFromSource(&move1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(ui::kCursorNull, host->last_cursor().native_type());
|
| @@ -602,24 +611,27 @@ TEST_F(WindowManagerTest, TransformActivate) {
|
|
|
| gfx::Point miss_point(5, 5);
|
| transform.TransformPoint(&miss_point);
|
| - ui::MouseEvent mouseev1(ui::ET_MOUSE_PRESSED, miss_point, miss_point,
|
| - ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON,
|
| - ui::EF_LEFT_MOUSE_BUTTON);
|
| + ui::MouseEvent mouseev1(
|
| + ui::ET_MOUSE_PRESSED, miss_point, miss_point, ui::EventTimeForNow(),
|
| + ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| ui::EventSink* sink = root_window->GetHost()->event_sink();
|
| ui::EventDispatchDetails details = sink->OnEventFromSource(&mouseev1);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_EQ(NULL, aura::client::GetFocusClient(w1.get())->GetFocusedWindow());
|
| - ui::MouseEvent mouseup(ui::ET_MOUSE_RELEASED, miss_point, miss_point,
|
| - ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON,
|
| - ui::EF_LEFT_MOUSE_BUTTON);
|
| + ui::MouseEvent mouseup(
|
| + ui::ET_MOUSE_RELEASED, miss_point, miss_point, ui::EventTimeForNow(),
|
| + ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| details = sink->OnEventFromSource(&mouseup);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
|
|
| gfx::Point hit_point(5, 15);
|
| transform.TransformPoint(&hit_point);
|
| - ui::MouseEvent mouseev2(ui::ET_MOUSE_PRESSED, hit_point, hit_point,
|
| - ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON,
|
| - ui::EF_LEFT_MOUSE_BUTTON);
|
| + ui::MouseEvent mouseev2(
|
| + ui::ET_MOUSE_PRESSED, hit_point, hit_point, ui::EventTimeForNow(),
|
| + ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| details = sink->OnEventFromSource(&mouseev2);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| EXPECT_TRUE(wm::IsActiveWindow(w1.get()));
|
| @@ -652,8 +664,10 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
|
| ui::EventSink* sink = root_window->GetHost()->event_sink();
|
| ui::EventDispatchDetails details = sink->OnEventFromSource(&key_event);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| - ui::MouseEvent mouse_pressed(ui::ET_MOUSE_PRESSED, gfx::Point(0, 0),
|
| - gfx::Point(0, 0), ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent mouse_pressed(
|
| + ui::ET_MOUSE_PRESSED, gfx::Point(0, 0), gfx::Point(0, 0),
|
| + ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| details = sink->OnEventFromSource(&mouse_pressed);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
|
|
| @@ -673,8 +687,10 @@ TEST_F(WindowManagerTest, AdditionalFilters) {
|
| // Dispatches events.
|
| details = sink->OnEventFromSource(&key_event);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
| - ui::MouseEvent mouse_released(ui::ET_MOUSE_RELEASED, gfx::Point(0, 0),
|
| - gfx::Point(0, 0), ui::EventTimeForNow(), 0, 0);
|
| + ui::MouseEvent mouse_released(
|
| + ui::ET_MOUSE_RELEASED, gfx::Point(0, 0), gfx::Point(0, 0),
|
| + ui::EventTimeForNow(), 0, 0,
|
| + ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| details = sink->OnEventFromSource(&mouse_released);
|
| ASSERT_FALSE(details.dispatcher_destroyed);
|
|
|
|
|