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

Side by Side Diff: ui/ozone/platform/wayland/wayland_pointer_unittest.cc

Issue 2147523003: Rename WaylandDisplay to WaylandConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add argument name Created 4 years, 5 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
OLDNEW
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 <linux/input.h> 5 #include <linux/input.h>
6 #include <wayland-server.h> 6 #include <wayland-server.h>
7 7
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/events/event.h" 10 #include "ui/events/event.h"
(...skipping 25 matching lines...) Expand all
36 36
37 protected: 37 protected:
38 wl::MockPointer* pointer; 38 wl::MockPointer* pointer;
39 39
40 private: 40 private:
41 DISALLOW_COPY_AND_ASSIGN(WaylandPointerTest); 41 DISALLOW_COPY_AND_ASSIGN(WaylandPointerTest);
42 }; 42 };
43 43
44 TEST_F(WaylandPointerTest, Leave) { 44 TEST_F(WaylandPointerTest, Leave) {
45 MockPlatformWindowDelegate other_delegate; 45 MockPlatformWindowDelegate other_delegate;
46 WaylandWindow other_window(&other_delegate, &display, 46 WaylandWindow other_window(&other_delegate, &connection,
47 gfx::Rect(0, 0, 10, 10)); 47 gfx::Rect(0, 0, 10, 10));
48 gfx::AcceleratedWidget other_widget = gfx::kNullAcceleratedWidget; 48 gfx::AcceleratedWidget other_widget = gfx::kNullAcceleratedWidget;
49 EXPECT_CALL(other_delegate, OnAcceleratedWidgetAvailable(_, _)) 49 EXPECT_CALL(other_delegate, OnAcceleratedWidgetAvailable(_, _))
50 .WillOnce(SaveArg<0>(&other_widget)); 50 .WillOnce(SaveArg<0>(&other_widget));
51 ASSERT_TRUE(other_window.Initialize()); 51 ASSERT_TRUE(other_window.Initialize());
52 ASSERT_NE(other_widget, gfx::kNullAcceleratedWidget); 52 ASSERT_NE(other_widget, gfx::kNullAcceleratedWidget);
53 53
54 Sync(); 54 Sync();
55 55
56 wl::MockSurface* other_surface = 56 wl::MockSurface* other_surface =
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 auto mouse_wheel_event = static_cast<MouseWheelEvent*>(event.get()); 223 auto mouse_wheel_event = static_cast<MouseWheelEvent*>(event.get());
224 EXPECT_EQ(gfx::Vector2d(MouseWheelEvent::kWheelDelta, 0), 224 EXPECT_EQ(gfx::Vector2d(MouseWheelEvent::kWheelDelta, 0),
225 mouse_wheel_event->offset()); 225 mouse_wheel_event->offset());
226 EXPECT_EQ(EF_LEFT_MOUSE_BUTTON, mouse_wheel_event->button_flags()); 226 EXPECT_EQ(EF_LEFT_MOUSE_BUTTON, mouse_wheel_event->button_flags());
227 EXPECT_EQ(0, mouse_wheel_event->changed_button_flags()); 227 EXPECT_EQ(0, mouse_wheel_event->changed_button_flags());
228 EXPECT_EQ(gfx::PointF(50, 75), mouse_wheel_event->location_f()); 228 EXPECT_EQ(gfx::PointF(50, 75), mouse_wheel_event->location_f());
229 EXPECT_EQ(gfx::PointF(50, 75), mouse_wheel_event->root_location_f()); 229 EXPECT_EQ(gfx::PointF(50, 75), mouse_wheel_event->root_location_f());
230 } 230 }
231 231
232 } // namespace ui 232 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/wayland_display_unittest.cc ('k') | ui/ozone/platform/wayland/wayland_surface_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698