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

Unified Diff: trunk/src/ui/base/keycodes/usb_keycode_map_unittest.cc

Issue 23451030: Revert 222168 "Add a CodeToNativeKeycode helper that converts UI..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 | « trunk/src/ui/base/keycodes/usb_keycode_map.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ui/base/keycodes/usb_keycode_map_unittest.cc
===================================================================
--- trunk/src/ui/base/keycodes/usb_keycode_map_unittest.cc (revision 222198)
+++ trunk/src/ui/base/keycodes/usb_keycode_map_unittest.cc (working copy)
@@ -33,8 +33,6 @@
// Verify that the first element in the table is the "invalid" code.
EXPECT_EQ(InvalidUsbKeycode(), usb_keycode_map[0].usb_keycode);
EXPECT_EQ(InvalidNativeKeycode(), usb_keycode_map[0].native_keycode);
- EXPECT_EQ(InvalidKeyboardEventCode(), "Unidentified");
- EXPECT_EQ(InvalidNativeKeycode(), CodeToNativeKeycode("Unidentified"));
// Verify that there are no duplicate entries in the mapping.
std::map<uint32_t, uint16_t> usb_to_native;
@@ -48,18 +46,6 @@
EXPECT_EQ(usb_keycode_map[i].native_keycode,
UsbKeycodeToNativeKeycode(usb_keycode_map[i].usb_keycode));
- // Verify CodeToNativeKeycode and NativeKeycodeToCode work correctly.
- if (usb_keycode_map[i].code) {
- EXPECT_EQ(usb_keycode_map[i].native_keycode,
- CodeToNativeKeycode(usb_keycode_map[i].code));
- EXPECT_EQ(usb_keycode_map[i].code,
- NativeKeycodeToCode(usb_keycode_map[i].native_keycode));
- }
- else {
- EXPECT_EQ(InvalidNativeKeycode(),
- CodeToNativeKeycode(usb_keycode_map[i].code));
- }
-
// Verify that the USB or native codes aren't duplicated.
EXPECT_EQ(0U, usb_to_native.count(usb_keycode_map[i].usb_keycode))
<< " duplicate of USB code 0x" << std::hex << std::setfill('0')
« no previous file with comments | « trunk/src/ui/base/keycodes/usb_keycode_map.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698