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

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

Issue 2713373002: Fix 'auto variable type must not deduce to a raw pointer type' errors in Ozone/Wayland code (Closed)
Patch Set: Created 3 years, 9 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 wl_keyboard_send_key(keyboard->resource(), 2, 0, 30 /* a */, 54 wl_keyboard_send_key(keyboard->resource(), 2, 0, 30 /* a */,
55 WL_KEYBOARD_KEY_STATE_PRESSED); 55 WL_KEYBOARD_KEY_STATE_PRESSED);
56 56
57 std::unique_ptr<Event> event; 57 std::unique_ptr<Event> event;
58 EXPECT_CALL(delegate, DispatchEvent(_)).WillOnce(CloneEvent(&event)); 58 EXPECT_CALL(delegate, DispatchEvent(_)).WillOnce(CloneEvent(&event));
59 59
60 Sync(); 60 Sync();
61 ASSERT_TRUE(event); 61 ASSERT_TRUE(event);
62 ASSERT_TRUE(event->IsKeyEvent()); 62 ASSERT_TRUE(event->IsKeyEvent());
63 63
64 auto key_event = event->AsKeyEvent(); 64 auto* key_event = event->AsKeyEvent();
65 EXPECT_EQ(ui::VKEY_A, key_event->key_code()); 65 EXPECT_EQ(ui::VKEY_A, key_event->key_code());
66 EXPECT_EQ(ET_KEY_PRESSED, key_event->type()); 66 EXPECT_EQ(ET_KEY_PRESSED, key_event->type());
67 67
68 wl_keyboard_send_leave(keyboard->resource(), 3, surface->resource()); 68 wl_keyboard_send_leave(keyboard->resource(), 3, surface->resource());
69 69
70 Sync(); 70 Sync();
71 71
72 wl_keyboard_send_key(keyboard->resource(), 3, 0, 30 /* a */, 72 wl_keyboard_send_key(keyboard->resource(), 3, 0, 30 /* a */,
73 WL_KEYBOARD_KEY_STATE_PRESSED); 73 WL_KEYBOARD_KEY_STATE_PRESSED);
74 EXPECT_CALL(delegate, DispatchEvent(_)).Times(0); 74 EXPECT_CALL(delegate, DispatchEvent(_)).Times(0);
75 } 75 }
76 76
77 } // namespace ui 77 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/fake_server.cc ('k') | ui/ozone/platform/wayland/wayland_pointer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698