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

Side by Side Diff: chrome/test/remoting/key_code_test_map.h

Issue 807343002: Adding the first set of remote test cases and associated framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Source of data in this file:
6 // 1. ui/events/keycodes/dom4/keycode_converter_data.h
7 // 2. ui/events/keycodes/keyboard_codes.h
8 // 3. third_party/WebKit/Source/core/platform/chromium/KeyboardCodes.h
9 #ifndef CHROME_TEST_REMOTING_KEY_CODE_TEST_MAP_H_
10 #define CHROME_TEST_REMOTING_KEY_CODE_TEST_MAP_H_
11
12 #include "ui/events/keycodes/keyboard_codes.h"
13
14 namespace remoting {
15
16 typedef struct {
17 // The UIEvents (aka: DOM4Events) |code| value as defined in:
18 // https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
19 const char* code;
20
21 // The (Windows) virtual keyboard code.
22 ui::KeyboardCode vkey_code;
23 } KeyCodeTestMap;
24
25 const KeyCodeTestMap test_key_map[] = {
26 // Code KeyboardCode
Jamie 2014/12/17 03:15:40 Indentation is wrong (though you could just remove
Mike Meade 2014/12/18 18:54:24 Done.
27 {"KeyA", ui::VKEY_A},
28 {"KeyB", ui::VKEY_B},
29 {"KeyC", ui::VKEY_C},
30 {"KeyD", ui::VKEY_D},
31 {"KeyE", ui::VKEY_E},
32 {"KeyF", ui::VKEY_F},
33 {"KeyG", ui::VKEY_G},
34 {"KeyH", ui::VKEY_H},
35 {"KeyI", ui::VKEY_I},
36 {"KeyJ", ui::VKEY_J},
37 {"KeyK", ui::VKEY_K},
38 {"KeyL", ui::VKEY_L},
39 {"KeyM", ui::VKEY_M},
40 {"KeyN", ui::VKEY_N},
41 {"KeyO", ui::VKEY_O},
42 {"KeyP", ui::VKEY_P},
43 {"KeyQ", ui::VKEY_Q},
44 {"KeyR", ui::VKEY_R},
45 {"KeyS", ui::VKEY_S},
46 {"KeyT", ui::VKEY_T},
47 {"KeyU", ui::VKEY_U},
48 {"KeyV", ui::VKEY_V},
49 {"KeyW", ui::VKEY_W},
50 {"KeyX", ui::VKEY_X},
51 {"KeyY", ui::VKEY_Y},
52 {"KeyZ", ui::VKEY_Z},
53 };
54
55 const KeyCodeTestMap test_digit_map[] = {
56 {"Digit1", ui::VKEY_1},
57 {"Digit2", ui::VKEY_2},
58 {"Digit3", ui::VKEY_3},
59 {"Digit4", ui::VKEY_4},
60 {"Digit5", ui::VKEY_5},
61 {"Digit6", ui::VKEY_6},
62 {"Digit7", ui::VKEY_7},
63 {"Digit8", ui::VKEY_8},
64 {"Digit9", ui::VKEY_9},
65 {"Digit0", ui::VKEY_0},
66 };
67
68 const KeyCodeTestMap test_numpad_map[] = {
69 {"Numpad0", ui::VKEY_NUMPAD0},
70 {"Numpad1", ui::VKEY_NUMPAD1},
71 {"Numpad2", ui::VKEY_NUMPAD2},
72 {"Numpad3", ui::VKEY_NUMPAD3},
73 {"Numpad4", ui::VKEY_NUMPAD4},
74 {"Numpad5", ui::VKEY_NUMPAD5},
75 {"Numpad6", ui::VKEY_NUMPAD6},
76 {"Numpad7", ui::VKEY_NUMPAD7},
77 {"Numpad8", ui::VKEY_NUMPAD8},
78 {"Numpad9", ui::VKEY_NUMPAD9},
79 {"NumpadMultiply", ui::VKEY_MULTIPLY},
80 {"NumpadAdd", ui::VKEY_ADD},
81 {"NumpadSubtract", ui::VKEY_SUBTRACT},
82 {"NumpadDecimal", ui::VKEY_DECIMAL},
83 {"NumpadDivide", ui::VKEY_DIVIDE},
84 };
85
86 const KeyCodeTestMap test_special_map[] = {
87 {"Enter", ui::VKEY_RETURN},
88 {"ShiftRight", ui::VKEY_SHIFT},
89 {"Space", ui::VKEY_SPACE},
90 {"Backquote", ui::VKEY_OEM_3},
91 {"Comma", ui::VKEY_OEM_COMMA},
92 {"Period", ui::VKEY_OEM_PERIOD},
93 {"Home", ui::VKEY_HOME},
94 };
95
96 } // namespace remoting
97 #endif // CHROME_TEST_REMOTING_KEY_CODE_TEST_MAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698