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

Side by Side Diff: chrome/test/chromedriver/keycode_text_conversion_unittest.cc

Issue 12848005: [chromedriver] Separate stuff of chrome from chromedriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments and fix compile error on mac. Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
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 <string> 5 #include <string>
6 6
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/test/chromedriver/chrome/ui_events.h"
9 #include "chrome/test/chromedriver/keycode_text_conversion.h" 10 #include "chrome/test/chromedriver/keycode_text_conversion.h"
10 #include "chrome/test/chromedriver/test_util.h" 11 #include "chrome/test/chromedriver/test_util.h"
11 #include "chrome/test/chromedriver/ui_events.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 #include "ui/base/keycodes/keyboard_codes.h" 13 #include "ui/base/keycodes/keyboard_codes.h"
14 14
15 namespace { 15 namespace {
16 16
17 void CheckCharToKeyCode(char character, ui::KeyboardCode key_code, 17 void CheckCharToKeyCode(char character, ui::KeyboardCode key_code,
18 int modifiers) { 18 int modifiers) {
19 std::string character_string; 19 std::string character_string;
20 character_string.push_back(character); 20 character_string.push_back(character);
21 char16 character_utf16 = UTF8ToUTF16(character_string)[0]; 21 char16 character_utf16 = UTF8ToUTF16(character_string)[0];
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 #if defined(OS_WIN) 125 #if defined(OS_WIN)
126 ASSERT_TRUE(SwitchKeyboardLayout("00000408")); // greek 126 ASSERT_TRUE(SwitchKeyboardLayout("00000408")); // greek
127 CheckCharToKeyCode(';', ui::VKEY_Q, 0); 127 CheckCharToKeyCode(';', ui::VKEY_Q, 0);
128 EXPECT_EQ(";", ConvertKeyCodeToText(ui::VKEY_Q, 0)); 128 EXPECT_EQ(";", ConvertKeyCodeToText(ui::VKEY_Q, 0));
129 #elif defined(OS_MACOSX) 129 #elif defined(OS_MACOSX)
130 ASSERT_TRUE(SwitchKeyboardLayout("com.apple.keylayout.German")); 130 ASSERT_TRUE(SwitchKeyboardLayout("com.apple.keylayout.German"));
131 CheckCharToKeyCode('z', ui::VKEY_Y, 0); 131 CheckCharToKeyCode('z', ui::VKEY_Y, 0);
132 EXPECT_EQ("z", ConvertKeyCodeToText(ui::VKEY_Y, 0)); 132 EXPECT_EQ("z", ConvertKeyCodeToText(ui::VKEY_Y, 0));
133 #endif 133 #endif
134 } 134 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/keycode_text_conversion_mac.mm ('k') | chrome/test/chromedriver/keycode_text_conversion_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698