| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |