OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |