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

Side by Side Diff: ui/events/mojo/struct_traits_unittest.cc

Issue 2802923002: Re-adding and fixing StructTraitsTest for events and latency. (Closed)
Patch Set: Removing non-mojo :run_all_unittests Created 3 years, 8 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
« no previous file with comments | « ui/events/BUILD.gn ('k') | ui/latency/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "mojo/public/cpp/bindings/binding_set.h" 6 #include "mojo/public/cpp/bindings/binding_set.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/events/event.h" 8 #include "ui/events/event.h"
9 #include "ui/events/keycodes/dom/dom_code.h" 9 #include "ui/events/keycodes/dom/dom_code.h"
10 #include "ui/events/mojo/event.mojom.h" 10 #include "ui/events/mojo/event.mojom.h"
11 #include "ui/events/mojo/event_struct_traits.h" 11 #include "ui/events/mojo/event_struct_traits.h"
12 #include "ui/events/mojo/traits_test_service.mojom.h"
13 #include "ui/latency/mojo/latency_info_struct_traits.h"
12 14
13 namespace ui { 15 namespace ui {
14 16
15 namespace { 17 namespace {
16 18
17 class StructTraitsTest : public testing::Test, public mojom::TraitsTestService { 19 class StructTraitsTest : public testing::Test, public mojom::TraitsTestService {
18 public: 20 public:
19 StructTraitsTest() {} 21 StructTraitsTest() {}
20 22
21 protected: 23 protected:
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 std::unique_ptr<Event> event_ptr = Event::Clone(key_event); 181 std::unique_ptr<Event> event_ptr = Event::Clone(key_event);
180 std::unique_ptr<Event> deserialized; 182 std::unique_ptr<Event> deserialized;
181 ASSERT_TRUE(mojom::Event::Deserialize(mojom::Event::Serialize(&event_ptr), 183 ASSERT_TRUE(mojom::Event::Deserialize(mojom::Event::Serialize(&event_ptr),
182 &deserialized)); 184 &deserialized));
183 ASSERT_TRUE(deserialized->IsKeyEvent()); 185 ASSERT_TRUE(deserialized->IsKeyEvent());
184 ASSERT_TRUE(deserialized->AsKeyEvent()->properties()); 186 ASSERT_TRUE(deserialized->AsKeyEvent()->properties());
185 EXPECT_EQ(properties, *(deserialized->AsKeyEvent()->properties())); 187 EXPECT_EQ(properties, *(deserialized->AsKeyEvent()->properties()));
186 } 188 }
187 189
188 } // namespace ui 190 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/BUILD.gn ('k') | ui/latency/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698