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

Unified Diff: chrome/browser/referrer_policy_browsertest.cc

Issue 10479018: Add base::RunLoop and update ui_test_utils to use it to reduce flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added printfs to debug timeout which doesn't happen locally Created 8 years, 6 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/referrer_policy_browsertest.cc
diff --git a/chrome/browser/referrer_policy_browsertest.cc b/chrome/browser/referrer_policy_browsertest.cc
index 64d38d09804c3cabf53cc37fa4dca2d9d36f5703..27edef5c66d0e2299f99c4f553dfe103c8a1939b 100644
--- a/chrome/browser/referrer_policy_browsertest.cc
+++ b/chrome/browser/referrer_policy_browsertest.cc
@@ -162,6 +162,7 @@ class ReferrerPolicyTest : public InProcessBrowserTest {
tab = tab_added_observer.GetTab();
EXPECT_TRUE(tab);
ui_test_utils::WaitForLoadStop(tab);
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(expected_title, tab->GetTitle());
} else {
EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
@@ -254,8 +255,7 @@ IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, HttpsMiddleClickTargetBlankOrigin) {
// Context menu, from HTTP to HTTP.
IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, MAYBE_ContextMenuOrigin) {
ContextMenuNotificationObserver context_menu_observer(
- IDC_CONTENT_CONTEXT_OPENLINKNEWTAB,
- chrome::NOTIFICATION_TAB_ADDED);
+ IDC_CONTENT_CONTEXT_OPENLINKNEWTAB);
jar (doing other things) 2012/06/14 04:50:29 nit: Is wrap needed?
jbates 2012/06/15 02:20:38 wrap still needed (here and below).
RunReferrerTest("origin", false, false, false, true,
WebKit::WebMouseEvent::ButtonRight,
EXPECT_ORIGIN_AS_REFERRER);
@@ -264,8 +264,7 @@ IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, MAYBE_ContextMenuOrigin) {
// Context menu, from HTTPS to HTTP.
IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, MAYBE_HttpsContextMenuOrigin) {
ContextMenuNotificationObserver context_menu_observer(
- IDC_CONTENT_CONTEXT_OPENLINKNEWTAB,
- chrome::NOTIFICATION_TAB_ADDED);
+ IDC_CONTENT_CONTEXT_OPENLINKNEWTAB);
jar (doing other things) 2012/06/14 04:50:29 nit: wrap needed?
RunReferrerTest("origin", true, false, false, true,
WebKit::WebMouseEvent::ButtonRight,
EXPECT_ORIGIN_AS_REFERRER);
@@ -351,8 +350,7 @@ IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest,
// Context menu, from HTTP to HTTP via server redirect.
IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, MAYBE_ContextMenuRedirect) {
ContextMenuNotificationObserver context_menu_observer(
- IDC_CONTENT_CONTEXT_OPENLINKNEWTAB,
- chrome::NOTIFICATION_TAB_ADDED);
+ IDC_CONTENT_CONTEXT_OPENLINKNEWTAB);
jar (doing other things) 2012/06/14 04:50:29 nit: wrap?
RunReferrerTest("origin", false, false, true, true,
WebKit::WebMouseEvent::ButtonRight,
EXPECT_ORIGIN_AS_REFERRER);
@@ -361,8 +359,7 @@ IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, MAYBE_ContextMenuRedirect) {
// Context menu, from HTTPS to HTTP via server redirect.
IN_PROC_BROWSER_TEST_F(ReferrerPolicyTest, MAYBE_HttpsContextMenuRedirect) {
ContextMenuNotificationObserver context_menu_observer(
- IDC_CONTENT_CONTEXT_OPENLINKNEWTAB,
- chrome::NOTIFICATION_TAB_ADDED);
+ IDC_CONTENT_CONTEXT_OPENLINKNEWTAB);
jar (doing other things) 2012/06/14 04:50:29 nit: wrap?
RunReferrerTest("origin", true, false, true, true,
WebKit::WebMouseEvent::ButtonRight,
EXPECT_ORIGIN_AS_REFERRER);

Powered by Google App Engine
This is Rietveld 408576698