OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <list> | 5 #include <list> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/test/chromedriver/chrome/status.h" | 10 #include "chrome/test/chromedriver/chrome/status.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 const char kTextForKeys[] = { | 335 const char kTextForKeys[] = { |
336 #if defined(USE_AURA) || defined(OS_LINUX) | 336 #if defined(USE_AURA) || defined(OS_LINUX) |
337 0, 0, 0, '\b', '\t', 0, '\r', '\r', 0, 0, 0, 0, 0x1B, | 337 0, 0, 0, '\b', '\t', 0, '\r', '\r', 0, 0, 0, 0, 0x1B, |
338 ' ', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x7F, ';', '=', | 338 ' ', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x7F, ';', '=', |
339 #else | 339 #else |
340 0, 0, 0, 0, 0, 0, '\r', '\r', 0, 0, 0, 0, 0, | 340 0, 0, 0, 0, 0, 0, '\r', '\r', 0, 0, 0, 0, 0, |
341 ' ', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ';', '=', | 341 ' ', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ';', '=', |
342 #endif | 342 #endif |
343 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', | 343 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', |
344 '*', '+', ',', '-', '.', '/'}; | 344 '*', '+', ',', '-', '.', '/'}; |
345 for (size_t i = 0; i <= 0x3D; ++i) { | 345 for (base::char16 i = 0; i <= 0x3D; ++i) { |
346 if (i > 0x29 && i < 0x31) | 346 if (i > 0x29 && i < 0x31) |
347 continue; | 347 continue; |
348 base::string16 keys; | 348 base::string16 keys; |
349 int modifiers = 0; | 349 int modifiers = 0; |
350 keys.push_back(0xE000U + i); | 350 keys.push_back(0xE000U + i); |
351 std::list<KeyEvent> events; | 351 std::list<KeyEvent> events; |
352 if (i == 1) { | 352 if (i == 1) { |
353 EXPECT_NE(kOk, ConvertKeysToKeyEvents(keys, | 353 EXPECT_NE(kOk, ConvertKeysToKeyEvents(keys, |
354 true /* release_modifiers*/, | 354 true /* release_modifiers*/, |
355 &modifiers, &events).code()) | 355 &modifiers, &events).code()) |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 kShiftKeyModifierMask | kControlKeyModifierMask), | 403 kShiftKeyModifierMask | kControlKeyModifierMask), |
404 CreateKeyUpEvent(ui::VKEY_SHIFT, 0), | 404 CreateKeyUpEvent(ui::VKEY_SHIFT, 0), |
405 CreateKeyUpEvent(ui::VKEY_CONTROL, 0)}; | 405 CreateKeyUpEvent(ui::VKEY_CONTROL, 0)}; |
406 base::string16 keys; | 406 base::string16 keys; |
407 keys.push_back(static_cast<base::char16>(0xE008U)); | 407 keys.push_back(static_cast<base::char16>(0xE008U)); |
408 keys.push_back(static_cast<base::char16>(0xE009U)); | 408 keys.push_back(static_cast<base::char16>(0xE009U)); |
409 | 409 |
410 CheckEvents(keys, event_array, true /* release_modifiers */, | 410 CheckEvents(keys, event_array, true /* release_modifiers */, |
411 arraysize(event_array), 0); | 411 arraysize(event_array), 0); |
412 } | 412 } |
OLD | NEW |