| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/browser/renderer_host/input/web_input_event_builders_android.h
" | 5 #include "content/browser/renderer_host/input/web_input_event_builders_android.h
" |
| 6 | 6 |
| 7 #include <android/input.h> | 7 #include <android/input.h> |
| 8 #include <android/keycodes.h> | 8 #include <android/keycodes.h> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "third_party/WebKit/public/web/WebInputEvent.h" | 12 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 13 #include "ui/events/android/key_event_utils.h" | 13 #include "ui/events/android/key_event_utils.h" |
| 14 #include "ui/events/gesture_detection/motion_event.h" | 14 #include "ui/events/gesture_detection/motion_event.h" |
| 15 #include "ui/events/keycodes/dom/dom_code.h" | 15 #include "ui/events/keycodes/dom/dom_code.h" |
| 16 #include "ui/events/keycodes/dom/dom_key.h" | 16 #include "ui/events/keycodes/dom/dom_key.h" |
| 17 #include "ui/events/keycodes/dom/keycode_converter.h" | 17 #include "ui/events/keycodes/dom/keycode_converter.h" |
| 18 #include "ui/events/keycodes/keyboard_codes_posix.h" | 18 #include "ui/events/keycodes/keyboard_codes_posix.h" |
| 19 | 19 |
| 20 using base::android::AttachCurrentThread; | 20 using base::android::AttachCurrentThread; |
| 21 using base::android::ScopedJavaLocalRef; | 21 using base::android::ScopedJavaLocalRef; |
| 22 using blink::WebKeyboardEvent; | 22 using blink::WebKeyboardEvent; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 {AKEYCODE_COPY, ui::DomKey::COPY}, | 187 {AKEYCODE_COPY, ui::DomKey::COPY}, |
| 188 {AKEYCODE_PASTE, ui::DomKey::PASTE}, | 188 {AKEYCODE_PASTE, ui::DomKey::PASTE}, |
| 189 }; | 189 }; |
| 190 | 190 |
| 191 for (const auto& entry : test_cases) { | 191 for (const auto& entry : test_cases) { |
| 192 WebKeyboardEvent web_event = | 192 WebKeyboardEvent web_event = |
| 193 CreateFakeWebKeyboardEvent(env, entry.key_code, 0, 0); | 193 CreateFakeWebKeyboardEvent(env, entry.key_code, 0, 0); |
| 194 EXPECT_EQ(entry.key, web_event.domKey); | 194 EXPECT_EQ(entry.key, web_event.domKey); |
| 195 } | 195 } |
| 196 } | 196 } |
| OLD | NEW |