OLD | NEW |
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 "content/common/input/web_input_event_traits.h" | 5 #include "content/common/input/web_input_event_traits.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/WebKit/public/web/WebInputEvent.h" | 10 #include "third_party/WebKit/public/web/WebInputEvent.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // Very basic smoke test to ensure stringification doesn't explode. | 165 // Very basic smoke test to ensure stringification doesn't explode. |
166 TEST_F(WebInputEventTraitsTest, ToString) { | 166 TEST_F(WebInputEventTraitsTest, ToString) { |
167 WebKeyboardEvent key; | 167 WebKeyboardEvent key; |
168 key.type = WebInputEvent::RawKeyDown; | 168 key.type = WebInputEvent::RawKeyDown; |
169 EXPECT_FALSE(WebInputEventTraits::ToString(key).empty()); | 169 EXPECT_FALSE(WebInputEventTraits::ToString(key).empty()); |
170 | 170 |
171 WebMouseEvent mouse; | 171 WebMouseEvent mouse; |
172 mouse.type = WebInputEvent::MouseMove; | 172 mouse.type = WebInputEvent::MouseMove; |
173 EXPECT_FALSE(WebInputEventTraits::ToString(mouse).empty()); | 173 EXPECT_FALSE(WebInputEventTraits::ToString(mouse).empty()); |
174 | 174 |
175 WebMouseEvent mouse_wheel; | 175 WebMouseWheelEvent mouse_wheel; |
176 mouse_wheel.type = WebInputEvent::MouseWheel; | 176 mouse_wheel.type = WebInputEvent::MouseWheel; |
177 EXPECT_FALSE(WebInputEventTraits::ToString(mouse_wheel).empty()); | 177 EXPECT_FALSE(WebInputEventTraits::ToString(mouse_wheel).empty()); |
178 | 178 |
179 WebGestureEvent gesture = | 179 WebGestureEvent gesture = |
180 CreateGesture(WebInputEvent::GesturePinchBegin, 1, 1); | 180 CreateGesture(WebInputEvent::GesturePinchBegin, 1, 1); |
181 EXPECT_FALSE(WebInputEventTraits::ToString(gesture).empty()); | 181 EXPECT_FALSE(WebInputEventTraits::ToString(gesture).empty()); |
182 | 182 |
183 WebTouchEvent touch = CreateTouch(WebInputEvent::TouchStart); | 183 WebTouchEvent touch = CreateTouch(WebInputEvent::TouchStart); |
184 EXPECT_FALSE(WebInputEventTraits::ToString(touch).empty()); | 184 EXPECT_FALSE(WebInputEventTraits::ToString(touch).empty()); |
185 } | 185 } |
186 | 186 |
187 } // namespace | 187 } // namespace |
188 } // namespace content | 188 } // namespace content |
OLD | NEW |