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

Side by Side Diff: ui/events/keycodes/keyboard_code_conversion_unittest.cc

Issue 1908683002: Replace OS_LEFT/RIGHT with META_LEFT/RIGHT (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ui/events/keycodes/keyboard_code_conversion.h" 5 #include "ui/events/keycodes/keyboard_code_conversion.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 {true, ui::DomKey::SHIFT, ui::VKEY_SHIFT}}, 238 {true, ui::DomKey::SHIFT, ui::VKEY_SHIFT}},
239 {ui::DomCode::SHIFT_RIGHT, 239 {ui::DomCode::SHIFT_RIGHT,
240 {true, ui::DomKey::SHIFT, ui::VKEY_SHIFT}, 240 {true, ui::DomKey::SHIFT, ui::VKEY_SHIFT},
241 {true, ui::DomKey::SHIFT, ui::VKEY_SHIFT}}, 241 {true, ui::DomKey::SHIFT, ui::VKEY_SHIFT}},
242 {ui::DomCode::ALT_LEFT, 242 {ui::DomCode::ALT_LEFT,
243 {true, ui::DomKey::ALT, ui::VKEY_MENU}, 243 {true, ui::DomKey::ALT, ui::VKEY_MENU},
244 {true, ui::DomKey::ALT, ui::VKEY_MENU}}, 244 {true, ui::DomKey::ALT, ui::VKEY_MENU}},
245 {ui::DomCode::ALT_RIGHT, 245 {ui::DomCode::ALT_RIGHT,
246 {true, ui::DomKey::ALT, ui::VKEY_MENU}, 246 {true, ui::DomKey::ALT, ui::VKEY_MENU},
247 {true, ui::DomKey::ALT, ui::VKEY_MENU}}, 247 {true, ui::DomKey::ALT, ui::VKEY_MENU}},
248 {ui::DomCode::OS_LEFT, 248 {ui::DomCode::META_LEFT,
249 {true, ui::DomKey::META, ui::VKEY_LWIN}, 249 {true, ui::DomKey::META, ui::VKEY_LWIN},
250 {true, ui::DomKey::META, ui::VKEY_LWIN}}, 250 {true, ui::DomKey::META, ui::VKEY_LWIN}},
251 {ui::DomCode::OS_RIGHT, 251 {ui::DomCode::META_RIGHT,
252 {true, ui::DomKey::META, ui::VKEY_LWIN}, 252 {true, ui::DomKey::META, ui::VKEY_LWIN},
253 {true, ui::DomKey::META, ui::VKEY_LWIN}}, 253 {true, ui::DomKey::META, ui::VKEY_LWIN}},
254 {ui::DomCode::DIGIT1, 254 {ui::DomCode::DIGIT1,
255 {true, ui::DomKey::Constant<'1'>::Character, ui::VKEY_1}, 255 {true, ui::DomKey::Constant<'1'>::Character, ui::VKEY_1},
256 {true, ui::DomKey::Constant<'!'>::Character, ui::VKEY_1}}, 256 {true, ui::DomKey::Constant<'!'>::Character, ui::VKEY_1}},
257 {ui::DomCode::EQUAL, 257 {ui::DomCode::EQUAL,
258 {true, ui::DomKey::Constant<'='>::Character, ui::VKEY_OEM_PLUS}, 258 {true, ui::DomKey::Constant<'='>::Character, ui::VKEY_OEM_PLUS},
259 {true, ui::DomKey::Constant<'+'>::Character, ui::VKEY_OEM_PLUS}}, 259 {true, ui::DomKey::Constant<'+'>::Character, ui::VKEY_OEM_PLUS}},
260 {ui::DomCode::TAB, 260 {ui::DomCode::TAB,
261 {true, ui::DomKey::TAB, ui::VKEY_TAB}, 261 {true, ui::DomKey::TAB, ui::VKEY_TAB},
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 // Verify that kDomCodeToKeyboardCodeMap is ordered by DomCode value. 519 // Verify that kDomCodeToKeyboardCodeMap is ordered by DomCode value.
520 uint32_t previous = 0; 520 uint32_t previous = 0;
521 for (const auto& it : ui::kDomCodeToKeyboardCodeMap) { 521 for (const auto& it : ui::kDomCodeToKeyboardCodeMap) {
522 uint32_t current = static_cast<uint32_t>(it.dom_code); 522 uint32_t current = static_cast<uint32_t>(it.dom_code);
523 EXPECT_LT(previous, current); 523 EXPECT_LT(previous, current);
524 previous = current; 524 previous = current;
525 } 525 }
526 } 526 }
527 527
528 } // namespace 528 } // namespace
OLDNEW
« no previous file with comments | « ui/events/keycodes/keyboard_code_conversion.cc ('k') | ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698