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

Side by Side Diff: content/test/mock_keyboard_driver_win.cc

Issue 8230034: Split most of RenderViewTest and associated classes into content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac build breaks. Created 9 years, 2 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
« no previous file with comments | « content/test/mock_keyboard_driver_win.h ('k') | content/test/mock_render_thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/renderer/mock_keyboard_driver_win.h" 5 #include "content/test/mock_keyboard_driver_win.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/renderer/mock_keyboard.h" 9 #include "content/test/mock_keyboard.h"
10 10
11 MockKeyboardDriverWin::MockKeyboardDriverWin() { 11 MockKeyboardDriverWin::MockKeyboardDriverWin() {
12 // Save the keyboard layout and status of the application. 12 // Save the keyboard layout and status of the application.
13 // This class changes the keyboard layout and status of this application. 13 // This class changes the keyboard layout and status of this application.
14 // This change may break succeeding tests. To prevent this possible break, we 14 // This change may break succeeding tests. To prevent this possible break, we
15 // should save the layout and status here to restore when this instance is 15 // should save the layout and status here to restore when this instance is
16 // destroyed. 16 // destroyed.
17 original_keyboard_layout_ = GetKeyboardLayout(0); 17 original_keyboard_layout_ = GetKeyboardLayout(0);
18 active_keyboard_layout_ = original_keyboard_layout_; 18 active_keyboard_layout_ = original_keyboard_layout_;
19 GetKeyboardState(&original_keyboard_states_[0]); 19 GetKeyboardState(&original_keyboard_states_[0]);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // the mofifiers. 154 // the mofifiers.
155 CHECK(output); 155 CHECK(output);
156 wchar_t code[16]; 156 wchar_t code[16];
157 int length = ToUnicodeEx(key_code, MapVirtualKey(key_code, 0), 157 int length = ToUnicodeEx(key_code, MapVirtualKey(key_code, 0),
158 &keyboard_states_[0], &code[0], arraysize(code), 0, 158 &keyboard_states_[0], &code[0], arraysize(code), 0,
159 active_keyboard_layout_); 159 active_keyboard_layout_);
160 if (length > 0) 160 if (length > 0)
161 output->assign(code); 161 output->assign(code);
162 return length; 162 return length;
163 } 163 }
OLDNEW
« no previous file with comments | « content/test/mock_keyboard_driver_win.h ('k') | content/test/mock_render_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698