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

Unified Diff: chrome/browser/browser_focus_uitest.cc

Issue 171079: more linux automation porting: SendKeyPressNotifyWhenDone... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/views/bookmark_bar_view_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_focus_uitest.cc
===================================================================
--- chrome/browser/browser_focus_uitest.cc (revision 23591)
+++ chrome/browser/browser_focus_uitest.cc (working copy)
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/keyboard_codes.h"
#include "base/message_loop.h"
#include "base/ref_counted.h"
#include "chrome/browser/automation/ui_controls.h"
@@ -390,7 +391,8 @@
&actual));
ASSERT_STREQ(kExpElementIDs[j], actual.c_str());
- ui_controls::SendKeyPressNotifyWhenDone(L'\t', false, false, false,
+ ui_controls::SendKeyPressNotifyWhenDone(NULL, base::VKEY_TAB, false,
+ false, false,
new MessageLoop::QuitTask());
ui_test_utils::RunMessageLoop();
// Ideally, we wouldn't sleep here and instead would use the event
@@ -413,7 +415,8 @@
// Now let's press shift-tab to move the focus in reverse.
for (int j = 0; j < 7; ++j) {
- ui_controls::SendKeyPressNotifyWhenDone(L'\t', false, true, false,
+ ui_controls::SendKeyPressNotifyWhenDone(NULL, base::VKEY_TAB, false,
+ true, false,
new MessageLoop::QuitTask());
ui_test_utils::RunMessageLoop();
::Sleep(kActionDelayMs);
@@ -490,7 +493,8 @@
std::string actual = interstitial_page->GetFocusedElement();
ASSERT_STREQ(kExpElementIDs[j], actual.c_str());
- ui_controls::SendKeyPressNotifyWhenDone(L'\t', false, false, false,
+ ui_controls::SendKeyPressNotifyWhenDone(NULL, base::VKEY_TAB, false,
+ false, false,
new MessageLoop::QuitTask());
ui_test_utils::RunMessageLoop();
// Ideally, we wouldn't sleep here and instead would use the event
@@ -513,7 +517,8 @@
// Now let's press shift-tab to move the focus in reverse.
for (int j = 0; j < 7; ++j) {
- ui_controls::SendKeyPressNotifyWhenDone(L'\t', false, true, false,
+ ui_controls::SendKeyPressNotifyWhenDone(NULL, base::VKEY_TAB, false,
+ true, false,
new MessageLoop::QuitTask());
ui_test_utils::RunMessageLoop();
::Sleep(kActionDelayMs);
@@ -591,8 +596,8 @@
LocationBarView* location_bar = browser_view->GetLocationBarView();
// Press Ctrl+F, which will make the Find box open and request focus.
- static const int VK_F = 0x46;
- ui_controls::SendKeyPressNotifyWhenDone(L'F', true, false, false,
+ ui_controls::SendKeyPressNotifyWhenDone(NULL, base::VKEY_F, true,
+ false, false,
new MessageLoop::QuitTask());
ui_test_utils::RunMessageLoop();
@@ -620,7 +625,8 @@
EXPECT_EQ(location_bar, focus_manager->GetFocusedView());
// Now press Ctrl+F again and focus should move to the Find box.
- ui_controls::SendKeyPressNotifyWhenDone(L'F', true, false, false,
+ ui_controls::SendKeyPressNotifyWhenDone(NULL, base::VKEY_F, true,
+ false, false,
new MessageLoop::QuitTask());
ui_test_utils::RunMessageLoop();
focused_view = focus_manager->GetFocusedView();
@@ -638,8 +644,8 @@
focus_manager->GetFocusedView());
// Now press Ctrl+F again and focus should move to the Find box.
- ui_controls::SendKeyPressNotifyWhenDone(VK_F, true, false, false,
- new MessageLoop::QuitTask());
+ ui_controls::SendKeyPressNotifyWhenDone(NULL, base::VKEY_F, true, false,
+ false, new MessageLoop::QuitTask());
ui_test_utils::RunMessageLoop();
// See remark above on why we wait.
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/views/bookmark_bar_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698