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

Unified Diff: webkit/appcache/mock_appcache_storage_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 | « webkit/appcache/appcache_service_unittest.cc ('k') | webkit/blob/blob_url_request_job_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/mock_appcache_storage_unittest.cc
diff --git a/webkit/appcache/mock_appcache_storage_unittest.cc b/webkit/appcache/mock_appcache_storage_unittest.cc
index 3ac85430449a3591b310b075dc487a84f98c6df7..f230db245f1fc5453d1cd257cedf3428b0775861 100644
--- a/webkit/appcache/mock_appcache_storage_unittest.cc
+++ b/webkit/appcache/mock_appcache_storage_unittest.cc
@@ -84,7 +84,7 @@ TEST_F(MockAppCacheStorageTest, LoadCache_Miss) {
MockStorageDelegate delegate;
service.storage()->LoadCache(111, &delegate);
EXPECT_NE(111, delegate.loaded_cache_id_);
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(111, delegate.loaded_cache_id_);
EXPECT_FALSE(delegate.loaded_cache_);
}
@@ -118,7 +118,7 @@ TEST_F(MockAppCacheStorageTest, CreateGroup) {
service.storage()->LoadOrCreateGroup(manifest_url, &delegate);
EXPECT_NE(manifest_url, delegate.loaded_manifest_url_);
EXPECT_FALSE(delegate.loaded_group_.get());
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(manifest_url, delegate.loaded_manifest_url_);
EXPECT_TRUE(delegate.loaded_group_.get());
EXPECT_TRUE(delegate.loaded_group_->HasOneRef());
@@ -137,7 +137,7 @@ TEST_F(MockAppCacheStorageTest, LoadGroup_NearHit) {
// to be "unstored" and "currently in use".
GURL manifest_url("http://blah/");
service.storage()->LoadOrCreateGroup(manifest_url, &delegate);
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(manifest_url, delegate.loaded_manifest_url_);
EXPECT_TRUE(delegate.loaded_group_.get());
@@ -189,7 +189,7 @@ TEST_F(MockAppCacheStorageTest, LoadGroupAndCache_FarHit) {
storage->LoadCache(cache_id, &delegate);
EXPECT_NE(cache_id, delegate.loaded_cache_id_);
EXPECT_NE(cache_ptr, delegate.loaded_cache_.get());
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(cache_id, delegate.loaded_cache_id_);
EXPECT_EQ(cache_ptr, delegate.loaded_cache_.get());
delegate.loaded_cache_ = NULL;
@@ -200,7 +200,7 @@ TEST_F(MockAppCacheStorageTest, LoadGroupAndCache_FarHit) {
storage->LoadOrCreateGroup(manifest_url, &delegate);
EXPECT_NE(manifest_url, delegate.loaded_manifest_url_);
EXPECT_FALSE(delegate.loaded_group_.get());
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(manifest_url, delegate.loaded_manifest_url_);
EXPECT_EQ(group_ptr, delegate.loaded_group_.get());
}
@@ -229,7 +229,7 @@ TEST_F(MockAppCacheStorageTest, StoreNewGroup) {
EXPECT_FALSE(delegate.stored_group_success_);
EXPECT_TRUE(storage->stored_caches_.empty());
EXPECT_TRUE(storage->stored_groups_.empty());
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_TRUE(delegate.stored_group_success_);
EXPECT_FALSE(storage->stored_caches_.empty());
EXPECT_FALSE(storage->stored_groups_.empty());
@@ -270,7 +270,7 @@ TEST_F(MockAppCacheStorageTest, StoreExistingGroup) {
EXPECT_EQ(size_t(1), storage->stored_groups_.size());
EXPECT_TRUE(storage->IsCacheStored(old_cache));
EXPECT_FALSE(storage->IsCacheStored(new_cache));
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_TRUE(delegate.stored_group_success_);
EXPECT_EQ(size_t(1), storage->stored_caches_.size());
EXPECT_EQ(size_t(1), storage->stored_groups_.size());
@@ -313,7 +313,7 @@ TEST_F(MockAppCacheStorageTest, StoreExistingGroupExistingCache) {
EXPECT_FALSE(delegate.stored_group_success_);
EXPECT_EQ(size_t(1), storage->stored_caches_.size());
EXPECT_EQ(size_t(1), storage->stored_groups_.size());
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_TRUE(delegate.stored_group_success_);
EXPECT_EQ(size_t(1), storage->stored_caches_.size());
EXPECT_EQ(size_t(1), storage->stored_groups_.size());
@@ -354,7 +354,7 @@ TEST_F(MockAppCacheStorageTest, MakeGroupObsolete) {
EXPECT_EQ(size_t(1), storage->stored_groups_.size());
EXPECT_FALSE(cache->HasOneRef());
EXPECT_FALSE(group->HasOneRef());
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_TRUE(delegate.obsoleted_success_);
EXPECT_EQ(group.get(), delegate.obsoleted_group_.get());
EXPECT_TRUE(group->is_obsolete());
@@ -399,7 +399,7 @@ TEST_F(MockAppCacheStorageTest, FindNoMainResponse) {
EXPECT_NE(url, delegate.found_url_);
storage->FindResponseForMainRequest(url, GURL(), &delegate);
EXPECT_NE(url, delegate.found_url_);
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(url, delegate.found_url_);
EXPECT_TRUE(delegate.found_manifest_url_.is_empty());
EXPECT_EQ(kNoCacheId, delegate.found_cache_id_);
@@ -436,7 +436,7 @@ TEST_F(MockAppCacheStorageTest, BasicFindMainResponse) {
EXPECT_NE(kEntryUrl, delegate.found_url_);
storage->FindResponseForMainRequest(kEntryUrl, GURL(), &delegate);
EXPECT_NE(kEntryUrl, delegate.found_url_);
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(kEntryUrl, delegate.found_url_);
EXPECT_EQ(kManifestUrl, delegate.found_manifest_url_);
EXPECT_EQ(kCacheId, delegate.found_cache_id_);
@@ -493,7 +493,7 @@ TEST_F(MockAppCacheStorageTest, BasicFindMainFallbackResponse) {
EXPECT_NE(kTestUrl, delegate.found_url_);
storage->FindResponseForMainRequest(kTestUrl, GURL(), &delegate);
EXPECT_NE(kTestUrl, delegate.found_url_);
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(kTestUrl, delegate.found_url_);
EXPECT_EQ(kManifestUrl, delegate.found_manifest_url_);
EXPECT_EQ(kCacheId, delegate.found_cache_id_);
@@ -550,7 +550,7 @@ TEST_F(MockAppCacheStorageTest, FindMainResponseWithMultipleCandidates) {
EXPECT_NE(kEntryUrl, delegate.found_url_);
storage->FindResponseForMainRequest(kEntryUrl, GURL(), &delegate);
EXPECT_NE(kEntryUrl, delegate.found_url_);
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(kEntryUrl, delegate.found_url_);
EXPECT_EQ(kManifestUrl2, delegate.found_manifest_url_);
EXPECT_EQ(kCacheId2, delegate.found_cache_id_);
@@ -596,7 +596,7 @@ TEST_F(MockAppCacheStorageTest, FindMainResponseExclusions) {
EXPECT_NE(kEntryUrl, delegate.found_url_);
storage->FindResponseForMainRequest(kEntryUrl, GURL(), &delegate);
EXPECT_NE(kEntryUrl, delegate.found_url_);
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(kEntryUrl, delegate.found_url_);
EXPECT_TRUE(delegate.found_manifest_url_.is_empty());
EXPECT_EQ(kNoCacheId, delegate.found_cache_id_);
@@ -610,7 +610,7 @@ TEST_F(MockAppCacheStorageTest, FindMainResponseExclusions) {
EXPECT_NE(kOnlineNamespaceUrl, delegate.found_url_);
storage->FindResponseForMainRequest(kOnlineNamespaceUrl, GURL(), &delegate);
EXPECT_NE(kOnlineNamespaceUrl, delegate.found_url_);
- MessageLoop::current()->RunAllPending(); // Do async task execution.
+ MessageLoop::current()->RunUntilIdle(); // Do async task execution.
EXPECT_EQ(kOnlineNamespaceUrl, delegate.found_url_);
EXPECT_TRUE(delegate.found_manifest_url_.is_empty());
EXPECT_EQ(kNoCacheId, delegate.found_cache_id_);
« no previous file with comments | « webkit/appcache/appcache_service_unittest.cc ('k') | webkit/blob/blob_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698