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

Unified Diff: webkit/appcache/appcache_quota_client_unittest.cc

Issue 11595003: webkit: Update the calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | « no previous file | webkit/appcache/appcache_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_quota_client_unittest.cc
diff --git a/webkit/appcache/appcache_quota_client_unittest.cc b/webkit/appcache/appcache_quota_client_unittest.cc
index e86aeef49afbf7b73f22e64c72d30d3a80a4524e..d586b943c599d0f14ec6e525dc86b31f7c16e134 100644
--- a/webkit/appcache/appcache_quota_client_unittest.cc
+++ b/webkit/appcache/appcache_quota_client_unittest.cc
@@ -44,7 +44,7 @@ class AppCacheQuotaClientTest : public testing::Test {
quota::StorageType type) {
usage_ = -1;
AsyncGetOriginUsage(client, origin, type);
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
return usage_;
}
@@ -53,7 +53,7 @@ class AppCacheQuotaClientTest : public testing::Test {
quota::StorageType type) {
origins_.clear();
AsyncGetOriginsForType(client, type);
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
return origins_;
}
@@ -63,7 +63,7 @@ class AppCacheQuotaClientTest : public testing::Test {
const std::string& host) {
origins_.clear();
AsyncGetOriginsForHost(client, type, host);
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
return origins_;
}
@@ -73,7 +73,7 @@ class AppCacheQuotaClientTest : public testing::Test {
const GURL& origin) {
delete_status_ = quota::kQuotaStatusUnknown;
AsyncDeleteOriginData(client, type, origin);
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
return delete_status_;
}
@@ -318,7 +318,7 @@ TEST_F(AppCacheQuotaClientTest, PendingRequests) {
EXPECT_EQ(0, num_get_origin_usage_completions_);
EXPECT_EQ(0, num_get_origins_completions_);
EXPECT_EQ(0, num_delete_origins_completions_);
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, num_get_origin_usage_completions_);
EXPECT_EQ(0, num_get_origins_completions_);
EXPECT_EQ(0, num_delete_origins_completions_);
@@ -328,7 +328,7 @@ TEST_F(AppCacheQuotaClientTest, PendingRequests) {
EXPECT_EQ(2, num_get_origin_usage_completions_);
EXPECT_EQ(4, num_get_origins_completions_);
EXPECT_EQ(0, num_delete_origins_completions_);
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(3, num_delete_origins_completions_); // deletes are really async
// They should be serviced in order requested.
@@ -357,7 +357,7 @@ TEST_F(AppCacheQuotaClientTest, DestroyServiceWithPending) {
AsyncDeleteOriginData(client, kTemp, kOriginA);
AsyncDeleteOriginData(client, kPerm, kOriginA);
AsyncDeleteOriginData(client, kTemp, kOriginB);
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, num_get_origin_usage_completions_);
EXPECT_EQ(0, num_get_origins_completions_);
EXPECT_EQ(0, num_delete_origins_completions_);
@@ -393,7 +393,7 @@ TEST_F(AppCacheQuotaClientTest, DestroyQuotaManagerWithPending) {
AsyncDeleteOriginData(client, kTemp, kOriginA);
AsyncDeleteOriginData(client, kPerm, kOriginA);
AsyncDeleteOriginData(client, kTemp, kOriginB);
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, num_get_origin_usage_completions_);
EXPECT_EQ(0, num_get_origins_completions_);
EXPECT_EQ(0, num_delete_origins_completions_);
@@ -403,7 +403,7 @@ TEST_F(AppCacheQuotaClientTest, DestroyQuotaManagerWithPending) {
Call_NotifyAppCacheReady(client);
// Callbacks should be deleted and not called.
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(0, num_get_origin_usage_completions_);
EXPECT_EQ(0, num_get_origins_completions_);
EXPECT_EQ(0, num_delete_origins_completions_);
@@ -428,7 +428,7 @@ TEST_F(AppCacheQuotaClientTest, DestroyWithDeleteInProgress) {
// A real completion callback from the service should
// be dropped if it comes in after NotifyAppCacheDestroyed.
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(1, num_delete_origins_completions_);
EXPECT_EQ(quota::kQuotaErrorAbort, delete_status_);
« no previous file with comments | « no previous file | webkit/appcache/appcache_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698