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

Side by Side Diff: content/common/input/web_input_event_traits_unittest.cc

Issue 642483003: Use a valid WebMouseWheelEvent in stringification test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | tools/valgrind/memcheck/suppressions.txt » ('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 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
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
OLDNEW
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698