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

Side by Side Diff: ui/events/ozone/evdev/event_converter_evdev_impl_unittest.cc

Issue 2088533002: Refactor ozone drm cursor code for mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build Created 4 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/events/ozone/evdev/event_converter_evdev_impl.h" 5 #include "ui/events/ozone/evdev/event_converter_evdev_impl.h"
6 6
7 #include <linux/input.h> 7 #include <linux/input.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 void MoveCursor(const gfx::Vector2dF& delta) override { 67 void MoveCursor(const gfx::Vector2dF& delta) override {
68 cursor_location_ = gfx::PointF(delta.x(), delta.y()); 68 cursor_location_ = gfx::PointF(delta.x(), delta.y());
69 } 69 }
70 bool IsCursorVisible() override { return 1; } 70 bool IsCursorVisible() override { return 1; }
71 gfx::Rect GetCursorConfinedBounds() override { 71 gfx::Rect GetCursorConfinedBounds() override {
72 NOTIMPLEMENTED(); 72 NOTIMPLEMENTED();
73 return gfx::Rect(); 73 return gfx::Rect();
74 } 74 }
75 gfx::PointF GetLocation() override { return cursor_location_; } 75 gfx::PointF GetLocation() override { return cursor_location_; }
76 76 void InitializeOnEvdev() override {}
77 private: 77 private:
78 // The location of the mock cursor. 78 // The location of the mock cursor.
79 gfx::PointF cursor_location_; 79 gfx::PointF cursor_location_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(MockCursorEvdev); 81 DISALLOW_COPY_AND_ASSIGN(MockCursorEvdev);
82 }; 82 };
83 83
84 } // namespace ui 84 } // namespace ui
85 85
86 // Test fixture. 86 // Test fixture.
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 dev->SetKeyFilter(true /* enable_filter */, allowed_keys); 659 dev->SetKeyFilter(true /* enable_filter */, allowed_keys);
660 ASSERT_EQ(1u, size()); 660 ASSERT_EQ(1u, size());
661 event = dispatched_event(0); 661 event = dispatched_event(0);
662 EXPECT_EQ(ui::ET_KEY_RELEASED, event->type()); 662 EXPECT_EQ(ui::ET_KEY_RELEASED, event->type());
663 663
664 // The real key release should be dropped, whenever it comes. 664 // The real key release should be dropped, whenever it comes.
665 ClearDispatchedEvents(); 665 ClearDispatchedEvents();
666 dev->ProcessEvents(key_release, arraysize(key_release)); 666 dev->ProcessEvents(key_release, arraysize(key_release));
667 ASSERT_EQ(0u, size()); 667 ASSERT_EQ(0u, size());
668 } 668 }
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/cursor_delegate_evdev.h ('k') | ui/events/ozone/evdev/event_thread_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698