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

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

Issue 2045603002: Handle the "key" field as opposed to keyIdentifier field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromeos Created 4 years, 6 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/WebViewTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebViewTest.cpp b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
index 905d7365cc9cec5397c4eedc2e66a98e6d0254fb..925df56797b54e6fe239540036d10999aa2400d5 100644
--- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -92,6 +92,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
+#include "ui/events/keycodes/dom/dom_key.h"
#include "web/WebLocalFrameImpl.h"
#include "web/WebSettingsImpl.h"
#include "web/WebViewImpl.h"
@@ -1994,6 +1995,7 @@ TEST_F(WebViewTest, CompositionNotCancelledByBackspace)
// Press Backspace and verify composition didn't get cancelled. This is to verify the fix
// for crbug.com/429916.
WebKeyboardEvent keyEvent;
+ keyEvent.domKey = ui::DomKey::FromCharacter('\b');
keyEvent.windowsKeyCode = VKEY_BACK;
keyEvent.setKeyIdentifierFromWindowsKeyCode();
keyEvent.type = WebInputEvent::RawKeyDown;
@@ -2176,6 +2178,7 @@ static void openDateTimeChooser(WebView* webView, HTMLInputElement* inputElement
inputElement->focus();
WebKeyboardEvent keyEvent;
+ keyEvent.domKey = ui::DomKey::FromCharacter(' ');
keyEvent.windowsKeyCode = VKEY_SPACE;
keyEvent.type = WebInputEvent::RawKeyDown;
keyEvent.setKeyIdentifierFromWindowsKeyCode();
@@ -2804,6 +2807,7 @@ TEST_F(WebViewTest, FirstUserGestureObservedKeyEvent)
EXPECT_EQ(0, client.getUserGestureNotificationsCount());
WebKeyboardEvent keyEvent;
+ keyEvent.domKey = ui::DomKey::FromCharacter(' ');
keyEvent.windowsKeyCode = VKEY_SPACE;
keyEvent.type = WebInputEvent::RawKeyDown;
keyEvent.setKeyIdentifierFromWindowsKeyCode();
« third_party/WebKit/Source/web/tests/DEPS ('K') | « third_party/WebKit/Source/web/tests/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698