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

Unified Diff: third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Rebase Created 3 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp b/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
index 0968fb6a6eecc60b74b59ee7cbe464f4674ed186..566324a2f79252f364c24cdad03af5f233463b2f 100644
--- a/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
@@ -420,9 +420,8 @@ TEST_F(WebPluginContainerTest, CopyInsertKeyboardEventsTest) {
WebInputEvent::NumLockOn |
WebInputEvent::IsLeft);
#endif
- WebKeyboardEvent webKeyboardEventC;
- webKeyboardEventC.type = WebInputEvent::RawKeyDown;
- webKeyboardEventC.modifiers = modifierKey;
+ WebKeyboardEvent webKeyboardEventC(WebInputEvent::RawKeyDown, modifierKey,
+ WebInputEvent::TimeStampForTesting);
webKeyboardEventC.windowsKeyCode = 67;
KeyboardEvent* keyEventC = KeyboardEvent::create(webKeyboardEventC, 0);
toWebPluginContainerImpl(pluginContainerOneElement.pluginContainer())
@@ -435,9 +434,9 @@ TEST_F(WebPluginContainerTest, CopyInsertKeyboardEventsTest) {
EXPECT_EQ(WebString(""), Platform::current()->clipboard()->readPlainText(
WebClipboard::Buffer()));
- WebKeyboardEvent webKeyboardEventInsert;
- webKeyboardEventInsert.type = WebInputEvent::RawKeyDown;
- webKeyboardEventInsert.modifiers = modifierKey;
+ WebKeyboardEvent webKeyboardEventInsert(WebInputEvent::RawKeyDown,
+ modifierKey,
+ WebInputEvent::TimeStampForTesting);
webKeyboardEventInsert.windowsKeyCode = 45;
KeyboardEvent* keyEventInsert =
KeyboardEvent::create(webKeyboardEventInsert, 0);
@@ -488,8 +487,9 @@ TEST_F(WebPluginContainerTest, GestureLongPressReachesPlugin) {
->plugin();
EventTestPlugin* testPlugin = static_cast<EventTestPlugin*>(plugin);
- WebGestureEvent event;
- event.type = WebInputEvent::GestureLongPress;
+ WebGestureEvent event(WebInputEvent::GestureLongPress,
+ WebInputEvent::NoModifiers,
+ WebInputEvent::TimeStampForTesting);
event.sourceDevice = WebGestureDeviceTouchscreen;
// First, send an event that doesn't hit the plugin to verify that the

Powered by Google App Engine
This is Rietveld 408576698