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

Side by Side Diff: blimp/net/input_message_unittest.cc

Issue 1779673003: Added network components for blimp text input feature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge origin/master Created 4 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
« no previous file with comments | « blimp/net/input_message_converter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <vector> 5 #include <vector>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "blimp/common/proto/blimp_message.pb.h" 9 #include "blimp/common/proto/blimp_message.pb.h"
10 #include "blimp/common/proto/input.pb.h" 10 #include "blimp/common/proto/input.pb.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 TEST(InputMessageTest, TestUnsupportedInputEventSerializationFails) { 124 TEST(InputMessageTest, TestUnsupportedInputEventSerializationFails) {
125 // We currently do not support MouseWheel events. If that changes update 125 // We currently do not support MouseWheel events. If that changes update
126 // this test. 126 // this test.
127 blink::WebGestureEvent event; 127 blink::WebGestureEvent event;
128 event.type = blink::WebInputEvent::Type::MouseWheel; 128 event.type = blink::WebInputEvent::Type::MouseWheel;
129 InputMessageGenerator generator; 129 InputMessageGenerator generator;
130 EXPECT_EQ(nullptr, generator.GenerateMessage(event).get()); 130 EXPECT_EQ(nullptr, generator.GenerateMessage(event).get());
131 } 131 }
132 132
133 TEST(InputMessageConverterTest, TestTextInputTypeToProtoConversion) {
134 for (size_t i = ui::TextInputType::TEXT_INPUT_TYPE_TEXT;
135 i < ui::TextInputType::TEXT_INPUT_TYPE_MAX; i++) {
136 ui::TextInputType type = static_cast<ui::TextInputType>(i);
137 EXPECT_EQ(type, InputMessageConverter::TextInputTypeFromProto(
138 InputMessageConverter::TextInputTypeToProto(type)));
139 }
140 }
141
133 } // namespace blimp 142 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/net/input_message_converter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698