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

Unified Diff: ui/events/event_unittest.cc

Issue 494813002: events: keycodes: Remove the stateless singleton instance of KeycodeConverter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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
« no previous file with comments | « remoting/host/input_injector_win.cc ('k') | ui/events/keycodes/dom4/keycode_converter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_unittest.cc
diff --git a/ui/events/event_unittest.cc b/ui/events/event_unittest.cc
index 7cc95e215d4792259b631bf21884fe3198e836a6..46c2f6375929ad4690fb00da1ae60c4e4b585391 100644
--- a/ui/events/event_unittest.cc
+++ b/ui/events/event_unittest.cc
@@ -329,11 +329,10 @@ TEST(EventTest, KeyEventCopy) {
}
TEST(EventTest, KeyEventCode) {
- KeycodeConverter* conv = KeycodeConverter::GetInstance();
-
const char kCodeForSpace[] = "Space";
- const uint16 kNativeCodeSpace = conv->CodeToNativeKeycode(kCodeForSpace);
- ASSERT_NE(conv->InvalidNativeKeycode(), kNativeCodeSpace);
+ const uint16 kNativeCodeSpace =
+ ui::KeycodeConverter::CodeToNativeKeycode(kCodeForSpace);
+ ASSERT_NE(ui::KeycodeConverter::InvalidNativeKeycode(), kNativeCodeSpace);
{
KeyEvent key(ET_KEY_PRESSED, VKEY_SPACE, kCodeForSpace, EF_NONE);
@@ -392,10 +391,8 @@ TEST(EventTest, KeyEventCode) {
#if defined(USE_X11) || defined(OS_WIN)
TEST(EventTest, AutoRepeat) {
- KeycodeConverter* conv = KeycodeConverter::GetInstance();
-
- const uint16 kNativeCodeA = conv->CodeToNativeKeycode("KeyA");
- const uint16 kNativeCodeB = conv->CodeToNativeKeycode("KeyB");
+ const uint16 kNativeCodeA = ui::KeycodeConverter::CodeToNativeKeycode("KeyA");
+ const uint16 kNativeCodeB = ui::KeycodeConverter::CodeToNativeKeycode("KeyB");
#if defined(USE_X11)
ScopedXI2Event native_event_a_pressed;
native_event_a_pressed.InitKeyEvent(ET_KEY_PRESSED, VKEY_A, kNativeCodeA);
« no previous file with comments | « remoting/host/input_injector_win.cc ('k') | ui/events/keycodes/dom4/keycode_converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698