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

Side by Side Diff: trunk/src/chrome/browser/ui/views/keyboard_access_browsertest.cc

Issue 474483002: Revert 289312 "Move StringToUpperASCII and LowerCaseEqualsASCII ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This functionality currently works on Windows and on Linux when 5 // This functionality currently works on Windows and on Linux when
6 // toolkit_views is defined (i.e. for Chrome OS). It's not needed 6 // toolkit_views is defined (i.e. for Chrome OS). It's not needed
7 // on the Mac, and it's not yet implemented on Linux. 7 // on the Mac, and it's not yet implemented on Linux.
8 8
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 LRESULT CALLBACK SystemMenuTestCBTHook(int n_code, 250 LRESULT CALLBACK SystemMenuTestCBTHook(int n_code,
251 WPARAM w_param, 251 WPARAM w_param,
252 LPARAM l_param) { 252 LPARAM l_param) {
253 // Look for the system menu window getting created or becoming visible and 253 // Look for the system menu window getting created or becoming visible and
254 // then select the New Tab option from the menu. 254 // then select the New Tab option from the menu.
255 if (n_code == HCBT_ACTIVATE || n_code == HCBT_CREATEWND) { 255 if (n_code == HCBT_ACTIVATE || n_code == HCBT_CREATEWND) {
256 wchar_t class_name[MAX_PATH] = {0}; 256 wchar_t class_name[MAX_PATH] = {0};
257 GetClassName(reinterpret_cast<HWND>(w_param), 257 GetClassName(reinterpret_cast<HWND>(w_param),
258 class_name, 258 class_name,
259 arraysize(class_name)); 259 arraysize(class_name));
260 if (base::LowerCaseEqualsASCII(class_name, "#32768")) { 260 if (LowerCaseEqualsASCII(class_name, "#32768")) {
261 // Select the New Tab option and then send the enter key to execute it. 261 // Select the New Tab option and then send the enter key to execute it.
262 ::PostMessage(reinterpret_cast<HWND>(w_param), WM_CHAR, 'T', 0); 262 ::PostMessage(reinterpret_cast<HWND>(w_param), WM_CHAR, 'T', 0);
263 ::PostMessage(reinterpret_cast<HWND>(w_param), WM_KEYDOWN, VK_RETURN, 0); 263 ::PostMessage(reinterpret_cast<HWND>(w_param), WM_KEYDOWN, VK_RETURN, 0);
264 ::PostMessage(reinterpret_cast<HWND>(w_param), WM_KEYUP, VK_RETURN, 0); 264 ::PostMessage(reinterpret_cast<HWND>(w_param), WM_KEYUP, VK_RETURN, 0);
265 } 265 }
266 } 266 }
267 return ::CallNextHookEx(0, n_code, w_param, l_param); 267 return ::CallNextHookEx(0, n_code, w_param, l_param);
268 } 268 }
269 269
270 void KeyboardAccessTest::TestSystemMenuWithKeyboard() { 270 void KeyboardAccessTest::TestSystemMenuWithKeyboard() {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 browser(), ui::VKEY_BROWSER_FORWARD, false, false, false, false)); 433 browser(), ui::VKEY_BROWSER_FORWARD, false, false, false, false));
434 434
435 base::string16 after_forward; 435 base::string16 after_forward;
436 ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(), &after_forward)); 436 ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(), &after_forward));
437 437
438 EXPECT_EQ(before_back, after_forward); 438 EXPECT_EQ(before_back, after_forward);
439 } 439 }
440 #endif 440 #endif
441 441
442 } // namespace 442 } // namespace
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/ui/login/login_prompt.cc ('k') | trunk/src/chrome/browser/ui/webui/chromeos/mobile_setup_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698