diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 18:36:51 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 18:36:51 +0000 |
commit | b4c62ebe8a5bce337c64f9776c225cafc6a51a16 (patch) | |
tree | 5fff0a30ab02ba08b8b9ff2dd2a675d36353c181 /net/cookies | |
parent | 90bb38d8b23ab609bd95b209b28df1eff5940cd5 (diff) | |
download | chromium_src-b4c62ebe8a5bce337c64f9776c225cafc6a51a16.zip chromium_src-b4c62ebe8a5bce337c64f9776c225cafc6a51a16.tar.gz chromium_src-b4c62ebe8a5bce337c64f9776c225cafc6a51a16.tar.bz2 |
net: Update calls from RunAllPending() to RunUntilIdle().
RunAllPending() is deprecated and we should switch to RunUntilIdle().
BUG=131220
TBR=willchan@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11361263
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/cookies')
-rw-r--r-- | net/cookies/cookie_monster_perftest.cc | 6 | ||||
-rw-r--r-- | net/cookies/cookie_monster_unittest.cc | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/net/cookies/cookie_monster_perftest.cc b/net/cookies/cookie_monster_perftest.cc index 7e755f0..727671f 100644 --- a/net/cookies/cookie_monster_perftest.cc +++ b/net/cookies/cookie_monster_perftest.cc @@ -65,7 +65,7 @@ class BaseCallback { // Therefore, callbacks will actually always complete synchronously. If the // tests get more advanced we need to add other means of signaling // completion. - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); EXPECT_TRUE(has_run_); has_run_ = false; } @@ -164,7 +164,7 @@ TEST_F(CookieMonsterTest, TestAddCookiesOnSingleHost) { PerfTimeLogger timer3("Cookie_monster_deleteall_single_host"); cm->DeleteAllAsync(CookieMonster::DeleteCallback()); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); timer3.Done(); } @@ -197,7 +197,7 @@ TEST_F(CookieMonsterTest, TestAddCookieOnManyHosts) { PerfTimeLogger timer3("Cookie_monster_deleteall_many_hosts"); cm->DeleteAllAsync(CookieMonster::DeleteCallback()); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); timer3.Done(); } diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc index af9d316..f4de594 100644 --- a/net/cookies/cookie_monster_unittest.cc +++ b/net/cookies/cookie_monster_unittest.cc @@ -1878,14 +1878,14 @@ TEST_F(CookieMonsterTest, FlushStore) { // Before initialization, FlushStore() should just run the callback. cm->FlushStore(base::Bind(&CallbackCounter::Callback, counter.get())); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); ASSERT_EQ(0, store->flush_count()); ASSERT_EQ(1, counter->callback_count()); // NULL callback is safe. cm->FlushStore(base::Closure()); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); ASSERT_EQ(0, store->flush_count()); ASSERT_EQ(1, counter->callback_count()); @@ -1893,14 +1893,14 @@ TEST_F(CookieMonsterTest, FlushStore) { // After initialization, FlushStore() should delegate to the store. GetAllCookies(cm); // Force init. cm->FlushStore(base::Bind(&CallbackCounter::Callback, counter.get())); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); ASSERT_EQ(1, store->flush_count()); ASSERT_EQ(2, counter->callback_count()); // NULL callback is still safe. cm->FlushStore(base::Closure()); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); ASSERT_EQ(2, store->flush_count()); ASSERT_EQ(2, counter->callback_count()); @@ -1909,12 +1909,12 @@ TEST_F(CookieMonsterTest, FlushStore) { cm = new CookieMonster(NULL, NULL); GetAllCookies(cm); // Force init. cm->FlushStore(base::Closure()); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); ASSERT_EQ(2, counter->callback_count()); cm->FlushStore(base::Bind(&CallbackCounter::Callback, counter.get())); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); ASSERT_EQ(3, counter->callback_count()); } |