diff options
9 files changed, 29 insertions, 29 deletions
diff --git a/chrome/nacl/nacl_ipc_adapter_unittest.cc b/chrome/nacl/nacl_ipc_adapter_unittest.cc index 3c64ece..404156a 100644 --- a/chrome/nacl/nacl_ipc_adapter_unittest.cc +++ b/chrome/nacl/nacl_ipc_adapter_unittest.cc @@ -37,7 +37,7 @@ class NaClIPCAdapterTest : public testing::Test { // The adapter destructor has to post a task to destroy the Channel on the // IO thread. For the purposes of the test, we just need to make sure that // task gets run, or it will appear as a leak. - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); } protected: @@ -128,7 +128,7 @@ TEST_F(NaClIPCAdapterTest, SendRewriting) { // Check that the message came out the other end in the test sink // (messages are posted, so we have to pump). - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); ASSERT_EQ(1u, sink_->message_count()); const IPC::Message* msg = sink_->GetMessageAt(0); @@ -144,14 +144,14 @@ TEST_F(NaClIPCAdapterTest, SendRewriting) { EXPECT_EQ(first_chunk_size, result); // First partial send should not have made any messages. - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); ASSERT_EQ(0u, sink_->message_count()); // Second partial send should do the same. int second_chunk_size = 2; result = Send(&buf[first_chunk_size], second_chunk_size); EXPECT_EQ(second_chunk_size, result); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); ASSERT_EQ(0u, sink_->message_count()); // Send the rest of the message in a third chunk. @@ -161,7 +161,7 @@ TEST_F(NaClIPCAdapterTest, SendRewriting) { EXPECT_EQ(third_chunk_size, result); // Last send should have generated one message. - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); ASSERT_EQ(1u, sink_->message_count()); msg = sink_->GetMessageAt(0); EXPECT_EQ(sizeof(int), msg->payload_size()); @@ -244,7 +244,7 @@ TEST_F(NaClIPCAdapterTest, SendOverflow) { // Send too much data and make sure that the send fails. int result = Send(buf, big_buf_size); EXPECT_EQ(-1, result); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); ASSERT_EQ(0u, sink_->message_count()); // Send too much data in two chunks and make sure that the send fails. @@ -253,13 +253,13 @@ TEST_F(NaClIPCAdapterTest, SendOverflow) { EXPECT_EQ(first_chunk_size, result); // First partial send should not have made any messages. - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); ASSERT_EQ(0u, sink_->message_count()); int second_chunk_size = big_buf_size - first_chunk_size; result = Send(&buf[first_chunk_size], second_chunk_size); EXPECT_EQ(-1, result); - message_loop_.RunAllPending(); + message_loop_.RunUntilIdle(); ASSERT_EQ(0u, sink_->message_count()); } diff --git a/chrome/renderer/autofill/password_autofill_manager_browsertest.cc b/chrome/renderer/autofill/password_autofill_manager_browsertest.cc index 529cdd8..281e3ad 100644 --- a/chrome/renderer/autofill/password_autofill_manager_browsertest.cc +++ b/chrome/renderer/autofill/password_autofill_manager_browsertest.cc @@ -125,7 +125,7 @@ class PasswordAutofillManagerTest : public ChromeRenderViewTest { autofill_agent_->textFieldDidChange(username_element_); // Processing is delayed because of a WebKit bug, see // PasswordAutocompleteManager::TextDidChangeInTextField() for details. - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); } void SimulateKeyDownEvent(const WebInputElement& element, diff --git a/chrome/renderer/extensions/chrome_v8_context_set_unittest.cc b/chrome/renderer/extensions/chrome_v8_context_set_unittest.cc index 65f3405..123cae7 100644 --- a/chrome/renderer/extensions/chrome_v8_context_set_unittest.cc +++ b/chrome/renderer/extensions/chrome_v8_context_set_unittest.cc @@ -52,7 +52,7 @@ TEST(ChromeV8ContextSet, Lifecycle) { EXPECT_FALSE(context->web_frame()); // Run loop to do the actual deletion. - loop.RunAllPending(); + loop.RunUntilIdle(); } } // namespace extensions diff --git a/chrome/renderer/safe_browsing/phishing_term_feature_extractor_unittest.cc b/chrome/renderer/safe_browsing/phishing_term_feature_extractor_unittest.cc index 3e12035..4bd5e90 100644 --- a/chrome/renderer/safe_browsing/phishing_term_feature_extractor_unittest.cc +++ b/chrome/renderer/safe_browsing/phishing_term_feature_extractor_unittest.cc @@ -99,7 +99,7 @@ class PhishingTermFeatureExtractorTest : public ::testing::Test { FROM_HERE, base::Bind(&PhishingTermFeatureExtractorTest::QuitExtraction, base::Unretained(this))); - msg_loop_.RunAllPending(); + msg_loop_.RunUntilIdle(); } // Completion callback for feature extraction. diff --git a/chrome/renderer/spellchecker/spellcheck_unittest.cc b/chrome/renderer/spellchecker/spellcheck_unittest.cc index c6b6f60..a617a61 100644 --- a/chrome/renderer/spellchecker/spellcheck_unittest.cc +++ b/chrome/renderer/spellchecker/spellcheck_unittest.cc @@ -933,7 +933,7 @@ TEST_F(SpellCheckTest, RequestSpellCheckWithEmptyString) { spell_check()->RequestTextChecking(string16(), 0, &completion); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); EXPECT_EQ(completion.completion_count_, 1U); } @@ -945,7 +945,7 @@ TEST_F(SpellCheckTest, RequestSpellCheckWithoutMisspelling) { const string16 text = ASCIIToUTF16("hello"); spell_check()->RequestTextChecking(text, 0, &completion); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); EXPECT_EQ(completion.completion_count_, 1U); } @@ -957,7 +957,7 @@ TEST_F(SpellCheckTest, RequestSpellCheckWithSingleMisspelling) { const string16 text = ASCIIToUTF16("apple, zz"); spell_check()->RequestTextChecking(text, 0, &completion); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); EXPECT_EQ(completion.completion_count_, 1U); EXPECT_EQ(completion.last_results_.size(), 1U); @@ -972,7 +972,7 @@ TEST_F(SpellCheckTest, RequestSpellCheckWithMisspellings) { const string16 text = ASCIIToUTF16("apple, zz, orange, zz"); spell_check()->RequestTextChecking(text, 0, &completion); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); EXPECT_EQ(completion.completion_count_, 1U); EXPECT_EQ(completion.last_results_.size(), 2U); @@ -996,7 +996,7 @@ TEST_F(SpellCheckTest, RequestSpellCheckWithMultipleRequests) { for (int i = 0; i < 3; ++i) spell_check()->RequestTextChecking(text[i], 0, &completion[i]); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); for (int i = 0; i < 3; ++i) { EXPECT_EQ(completion[i].completion_count_, 1U); @@ -1017,7 +1017,7 @@ TEST_F(SpellCheckTest, RequestSpellCheckWithoutInitialization) { spell_check()->RequestTextChecking(text, 0, &completion); // The task will not be posted yet. - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); EXPECT_EQ(completion.completion_count_, 0U); } @@ -1039,7 +1039,7 @@ TEST_F(SpellCheckTest, RequestSpellCheckMultipleTimesWithoutInitialization) { // The last task will be posted after initialization, however the other // requests should be pressed without spellchecking. - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); for (int i = 0; i < 2; ++i) EXPECT_EQ(completion[i].completion_count_, 1U); EXPECT_EQ(completion[2].completion_count_, 0U); @@ -1050,7 +1050,7 @@ TEST_F(SpellCheckTest, RequestSpellCheckMultipleTimesWithoutInitialization) { // Calls PostDelayedSpellCheckTask instead of OnInit here for simplicity. spell_check()->PostDelayedSpellCheckTask( spell_check()->pending_request_param_.release()); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); for (int i = 0; i < 3; ++i) EXPECT_EQ(completion[i].completion_count_, 1U); } diff --git a/chrome/renderer/translate_helper_browsertest.cc b/chrome/renderer/translate_helper_browsertest.cc index b469f24..415d869 100644 --- a/chrome/renderer/translate_helper_browsertest.cc +++ b/chrome/renderer/translate_helper_browsertest.cc @@ -96,7 +96,7 @@ TEST_F(TranslateHelperTest, TranslateLibNeverReady) { translate_helper_->TranslatePage( view_->GetPageId(), "en", "fr", std::string()); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); int page_id; TranslateErrors::Type error; @@ -132,7 +132,7 @@ TEST_F(TranslateHelperTest, TranslateSuccess) { std::string target_lang("fr"); translate_helper_->TranslatePage( view_->GetPageId(), original_lang, target_lang, std::string()); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); int page_id; std::string received_original_lang; @@ -175,7 +175,7 @@ TEST_F(TranslateHelperTest, TranslateFailure) { translate_helper_->TranslatePage( view_->GetPageId(), "en", "fr", std::string()); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); int page_id; TranslateErrors::Type error; @@ -209,7 +209,7 @@ TEST_F(TranslateHelperTest, UndefinedSourceLang) { translate_helper_->TranslatePage(view_->GetPageId(), chrome::kUnknownLanguageCode, "fr", std::string()); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); int page_id; TranslateErrors::Type error; @@ -249,7 +249,7 @@ TEST_F(TranslateHelperTest, MultipleSimilarTranslations) { // happens. translate_helper_->TranslatePage( view_->GetPageId(), original_lang, target_lang, std::string()); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); int page_id; std::string received_original_lang; @@ -287,7 +287,7 @@ TEST_F(TranslateHelperTest, MultipleDifferentTranslations) { std::string new_target_lang("de"); translate_helper_->TranslatePage( view_->GetPageId(), original_lang, new_target_lang, std::string()); - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); int page_id; std::string received_original_lang; diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc index b5ec124..b311538 100644 --- a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc +++ b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc @@ -126,7 +126,7 @@ class CloudPrintURLFetcherTest : public testing::Test, // Deleting the fetcher causes a task to be posted to the IO thread to // release references to the URLRequestContextGetter. We need to run all // pending tasks to execute that (this is the IO thread). - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); EXPECT_EQ(0, g_request_context_getter_instances); } diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc index b553cb8..6a28c65 100644 --- a/chrome/test/base/testing_profile.cc +++ b/chrome/test/base/testing_profile.cc @@ -384,7 +384,7 @@ void TestingProfile::DestroyTopSites() { // to be run to properly shutdown. Run all pending tasks now. This is // normally handled by browser_process shutdown. if (MessageLoop::current()) - MessageLoop::current()->RunAllPending(); + MessageLoop::current()->RunUntilIdle(); } } diff --git a/chrome/tools/profiles/generate_profile.cc b/chrome/tools/profiles/generate_profile.cc index 08f0170..ca4ee3e 100644 --- a/chrome/tools/profiles/generate_profile.cc +++ b/chrome/tools/profiles/generate_profile.cc @@ -257,7 +257,7 @@ int main(int argc, const char* argv[]) { const int batch_size = std::min(kBatchSize, url_count - page_id); InsertURLBatch(&profile, page_id, batch_size, types); // Run all pending messages to give TopSites a chance to catch up. - message_loop.RunAllPending(); + message_loop.RunUntilIdle(); page_id += batch_size; } @@ -266,7 +266,7 @@ int main(int argc, const char* argv[]) { profile.DestroyTopSites(); profile.DestroyHistoryService(); - message_loop.RunAllPending(); + message_loop.RunUntilIdle(); file_util::FileEnumerator file_iterator(profile.GetPath(), false, file_util::FileEnumerator::FILES); |