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

Unified Diff: chrome/browser/browser_keyevents_browsertest.cc

Issue 3117030: Adds ui_test_utils::SendAndWaitForKeyPress and converts callers (where (Closed)
Patch Set: Addressed review comments Created 10 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
Index: chrome/browser/browser_keyevents_browsertest.cc
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc
index 89f8c088bc2aea90ad0459dfd283a8990e585121..87a6bedf9d864f2c816a5508d29f341a49b9ef8b 100644
--- a/chrome/browser/browser_keyevents_browsertest.cc
+++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -149,10 +149,8 @@ class BrowserKeyEventsTest : public InProcessBrowserTest {
bool command) {
gfx::NativeWindow window = NULL;
ASSERT_NO_FATAL_FAILURE(GetNativeWindow(&window));
- EXPECT_TRUE(ui_controls::SendKeyPressNotifyWhenDone(
- window, key, control, shift, alt, command,
- new MessageLoop::QuitTask()));
- ui_test_utils::RunMessageLoop();
+ ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
+ window, key, control, shift, alt, command));
}
bool IsViewFocused(ViewID vid) {
@@ -790,7 +788,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_ReservedAccelerators) {
// Ctrl+F4 to close the tab.
ASSERT_NO_FATAL_FAILURE(SuppressAllEvents(0, true));
- ASSERT_NO_FATAL_FAILURE( SendKey(base::VKEY_F4, true, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(base::VKEY_F4, true, false, false, false));
ASSERT_EQ(1, browser()->tab_count());
#endif
}

Powered by Google App Engine
This is Rietveld 408576698