Index: chrome/browser/ui/sync/one_click_signin_helper_unittest.cc |
diff --git a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc |
index 7622cf2ff0ad5ba29ab990d3ec1bcc566a834f1f..58ce81fd2ecce1160d2a8420c5da2160fed96c60 100644 |
--- a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc |
+++ b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc |
@@ -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/message_loop.h" |
#include "chrome/browser/content_settings/cookie_settings.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -65,7 +66,12 @@ class OneClickSigninHelperTest : public testing::Test { |
void OneClickSigninHelperTest::TearDown() { |
// Destroy things in proper order. |
web_contents_.reset(); |
+ |
+ // Flush messages related web contents destruction before destroying the |
Derek Bruening
2012/06/01 15:04:24
nit: grammar
|
+ // browser context. |
+ MessageLoop::current()->RunAllPending(); |
profile_.reset(); |
+ |
ui_thread_.reset(); |
} |
@@ -146,7 +152,7 @@ TEST_F(OneClickSigninHelperTest, CanOfferIncognito) { |
TEST_F(OneClickSigninHelperTest, CanOfferNoSigninCookies) { |
MarkCurrentThreadAsUIThread(); |
- content::WebContents* web_contents = CreateMockWebContents(true); |
+ content::WebContents* web_contents = CreateMockWebContents(false); |
AllowSigninCookies(false); |
EXPECT_FALSE(OneClickSigninHelper::CanOffer(web_contents, true)); |