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

Unified Diff: google_apis/gaia/oauth2_token_service_request_unittest.cc

Issue 317773003: Ensure OAuth2TokenServiceRequest::Core is destroyed on owner thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Run loop in TearDown to ensure core is freed before unit test terminates. Created 6 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
« no previous file with comments | « google_apis/gaia/oauth2_token_service_request.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/oauth2_token_service_request_unittest.cc
diff --git a/google_apis/gaia/oauth2_token_service_request_unittest.cc b/google_apis/gaia/oauth2_token_service_request_unittest.cc
index b62700694c48b7a6965b9dd8fcdd989502576505..0a86cfd0e2da9a82151574c28ab9747b8bd8694c 100644
--- a/google_apis/gaia/oauth2_token_service_request_unittest.cc
+++ b/google_apis/gaia/oauth2_token_service_request_unittest.cc
@@ -146,6 +146,7 @@ void MockOAuth2TokenService::InvalidateOAuth2Token(
class OAuth2TokenServiceRequestTest : public testing::Test {
public:
virtual void SetUp() OVERRIDE;
+ virtual void TearDown() OVERRIDE;
protected:
class Provider : public OAuth2TokenServiceRequest::TokenServiceProvider {
@@ -177,6 +178,11 @@ void OAuth2TokenServiceRequestTest::SetUp() {
new Provider(base::MessageLoopProxy::current(), oauth2_service_.get()));
}
+void OAuth2TokenServiceRequestTest::TearDown() {
+ // Run the loop to execute any pending tasks that may free resources.
+ ui_loop_.RunUntilIdle();
+}
+
OAuth2TokenServiceRequestTest::Provider::Provider(
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
OAuth2TokenService* token_service)
« no previous file with comments | « google_apis/gaia/oauth2_token_service_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698