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

Side by Side Diff: chrome/browser/chromeos/compact_navigation_bar_browsertest.cc

Issue 1591004: RunAllPendingEvents -> ui_test_utils::RunAllPendingInMessageLoop (Closed)
Patch Set: " Created 10 years, 8 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser/automation/ui_controls.h" 5 #include "chrome/browser/automation/ui_controls.h"
6 #include "chrome/browser/browser.h" 6 #include "chrome/browser/browser.h"
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/chromeos/frame/browser_view.h" 8 #include "chrome/browser/chromeos/frame/browser_view.h"
9 #include "chrome/browser/chromeos/view_ids.h" 9 #include "chrome/browser/chromeos/view_ids.h"
10 #include "chrome/test/in_process_browser_test.h" 10 #include "chrome/test/in_process_browser_test.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 EXPECT_TRUE(IsViewIdVisible(VIEW_ID_TOOLBAR)); 44 EXPECT_TRUE(IsViewIdVisible(VIEW_ID_TOOLBAR));
45 } 45 }
46 46
47 IN_PROC_BROWSER_TEST_F(CompactNavigationBarTest, TestAccelerator) { 47 IN_PROC_BROWSER_TEST_F(CompactNavigationBarTest, TestAccelerator) {
48 EXPECT_FALSE(IsViewIdVisible(VIEW_ID_COMPACT_NAV_BAR)); 48 EXPECT_FALSE(IsViewIdVisible(VIEW_ID_COMPACT_NAV_BAR));
49 49
50 gfx::NativeWindow window = browser()->window()->GetNativeHandle(); 50 gfx::NativeWindow window = browser()->window()->GetNativeHandle();
51 51
52 // ctrl-shift-c should toggle compact navigation bar. 52 // ctrl-shift-c should toggle compact navigation bar.
53 ui_controls::SendKeyPress(window, base::VKEY_C, true, true, false); 53 ui_controls::SendKeyPress(window, base::VKEY_C, true, true, false);
54 RunAllPendingEvents(); 54 ui_test_utils::RunAllPendingInMessageLoop();
55 EXPECT_TRUE(IsViewIdVisible(VIEW_ID_COMPACT_NAV_BAR)); 55 EXPECT_TRUE(IsViewIdVisible(VIEW_ID_COMPACT_NAV_BAR));
56 56
57 ui_controls::SendKeyPress(window, base::VKEY_C, true, true, false); 57 ui_controls::SendKeyPress(window, base::VKEY_C, true, true, false);
58 RunAllPendingEvents(); 58 ui_test_utils::RunAllPendingInMessageLoop();
59 EXPECT_FALSE(IsViewIdVisible(VIEW_ID_COMPACT_NAV_BAR)); 59 EXPECT_FALSE(IsViewIdVisible(VIEW_ID_COMPACT_NAV_BAR));
60 60
61 // but ctrl-alt-c should not. 61 // but ctrl-alt-c should not.
62 ui_controls::SendKeyPress(window, base::VKEY_C, true, false, true); 62 ui_controls::SendKeyPress(window, base::VKEY_C, true, false, true);
63 RunAllPendingEvents(); 63 ui_test_utils::RunAllPendingInMessageLoop();
64 EXPECT_FALSE(IsViewIdVisible(VIEW_ID_COMPACT_NAV_BAR)); 64 EXPECT_FALSE(IsViewIdVisible(VIEW_ID_COMPACT_NAV_BAR));
65 } 65 }
66 66
67 } // namespace chromeos 67 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698