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

Unified Diff: chrome/browser/autofill/autofill_interactive_uitest.cc

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Fix mouse up event sender not modifying modifiers Created 4 years 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: chrome/browser/autofill/autofill_interactive_uitest.cc
diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc
index 0fd37af1cf51b82d32725220bb0f308d279a1bac..ec43d1c6150ada24712d64047737ac5dea1d0d76 100644
--- a/chrome/browser/autofill/autofill_interactive_uitest.cc
+++ b/chrome/browser/autofill/autofill_interactive_uitest.cc
@@ -53,6 +53,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
+#include "ui/events/base_event_utils.h"
#include "ui/events/keycodes/keyboard_code_conversion.h"
#include "ui/events/keycodes/keyboard_codes.h"
@@ -466,11 +467,12 @@ class AutofillInteractiveTest : public InProcessBrowserTest {
ui::DomCode code,
ui::KeyboardCode key_code) {
// Route popup-targeted key presses via the render view host.
- content::NativeWebKeyboardEvent event;
+ content::NativeWebKeyboardEvent event(blink::WebKeyboardEvent::RawKeyDown,
+ blink::WebInputEvent::NoModifiers,
+ ui::EventTimeForNow());
event.windowsKeyCode = key_code;
event.domCode = static_cast<int>(code);
event.domKey = key;
- event.type = blink::WebKeyboardEvent::RawKeyDown;
test_delegate_.Reset();
// Install the key press event sink to ensure that any events that are not
// handled by the installed callbacks do not end up crashing the test.
@@ -494,11 +496,12 @@ class AutofillInteractiveTest : public InProcessBrowserTest {
ui::DomCode code,
ui::KeyboardCode key_code) {
// Route popup-targeted key presses via the render view host.
- content::NativeWebKeyboardEvent event;
+ content::NativeWebKeyboardEvent event(blink::WebKeyboardEvent::RawKeyDown,
+ blink::WebInputEvent::NoModifiers,
+ ui::EventTimeForNow());
event.windowsKeyCode = key_code;
event.domCode = static_cast<int>(code);
event.domKey = key;
- event.type = blink::WebKeyboardEvent::RawKeyDown;
// Install the key press event sink to ensure that any events that are not
// handled by the installed callbacks do not end up crashing the test.
GetRenderViewHost()->GetWidget()->AddKeyPressEventCallback(

Powered by Google App Engine
This is Rietveld 408576698