Chromium Code Reviews| Index: components/suggestions/suggestions_service_unittest.cc |
| diff --git a/components/suggestions/suggestions_service_unittest.cc b/components/suggestions/suggestions_service_unittest.cc |
| index e95923c7ebff0ab34bc48526b1d4ca5fcf3ef4a3..fc9ee9e23d4a5e146be9e5fbd4b2baeb5edfd5a1 100644 |
| --- a/components/suggestions/suggestions_service_unittest.cc |
| +++ b/components/suggestions/suggestions_service_unittest.cc |
| @@ -340,7 +340,7 @@ TEST_F(SuggestionsServiceTest, FetchSuggestionsData) { |
| suggestions_service->FetchSuggestionsData(); |
| // Let the network request run. |
| - io_message_loop_.RunUntilIdle(); |
| + base::RunLoop().RunUntilIdle(); |
| // Ensure that CheckCallback() ran once. |
| EXPECT_EQ(1, suggestions_data_callback_count_); |
| @@ -363,7 +363,7 @@ TEST_F(SuggestionsServiceTest, FetchSuggestionsDataSyncNotInitializedEnabled) { |
| suggestions_service->FetchSuggestionsData(); |
| // Let any network request run. |
| - io_message_loop_.RunUntilIdle(); |
| + base::RunLoop().RunUntilIdle(); |
| // Ensure that CheckCallback() didn't run. |
| EXPECT_EQ(0, suggestions_data_callback_count_); |
| @@ -398,7 +398,7 @@ TEST_F(SuggestionsServiceTest, FetchSuggestionsDataSyncDisabled) { |
| suggestions_service->FetchSuggestionsData(); |
| // Let any network request run. |
| - io_message_loop_.RunUntilIdle(); |
| + base::RunLoop().RunUntilIdle(); |
| // Ensure that CheckCallback didn't run again. |
| EXPECT_EQ(1, suggestions_data_callback_count_); |
| @@ -420,7 +420,7 @@ TEST_F(SuggestionsServiceTest, FetchSuggestionsDataNoAccessToken) { |
| suggestions_service->FetchSuggestionsData(); |
| // No network request should be sent. |
| - io_message_loop_.RunUntilIdle(); |
| + base::RunLoop().RunUntilIdle(); |
| EXPECT_FALSE(HasPendingSuggestionsRequest(suggestions_service.get())); |
| EXPECT_EQ(0, suggestions_data_callback_count_); |
| } |
| @@ -443,7 +443,7 @@ TEST_F(SuggestionsServiceTest, IssueRequestIfNoneOngoingError) { |
| SuggestionsService::BuildSuggestionsURL()); |
| // (Testing only) wait until suggestion fetch is complete. |
| - io_message_loop_.RunUntilIdle(); |
| + base::RunLoop().RunUntilIdle(); |
| } |
| TEST_F(SuggestionsServiceTest, IssueRequestIfNoneOngoingResponseNotOK) { |
| @@ -465,7 +465,7 @@ TEST_F(SuggestionsServiceTest, IssueRequestIfNoneOngoingResponseNotOK) { |
| SuggestionsService::BuildSuggestionsURL()); |
| // (Testing only) wait until suggestion fetch is complete. |
| - io_message_loop_.RunUntilIdle(); |
| + base::RunLoop().RunUntilIdle(); |
| // Expect no suggestions in the cache. |
| SuggestionsProfile empty_suggestions; |
| @@ -511,7 +511,7 @@ TEST_F(SuggestionsServiceTest, BlacklistURL) { |
| // delay and the BlacklistStore's candidacy delay are zero). Then wait on |
| // the blacklist request, then again on the next blacklist scheduling task. |
| base::RunLoop().RunUntilIdle(); |
| - io_message_loop_.RunUntilIdle(); |
| + base::RunLoop().RunUntilIdle(); |
| base::RunLoop().RunUntilIdle(); |
| EXPECT_EQ(2, suggestions_data_callback_count_); |
| @@ -591,9 +591,9 @@ TEST_F(SuggestionsServiceTest, BlacklistURLRequestFails) { |
| // RunUntilIdle on the MessageLoop only works when the task is not posted for |
| // the future. |
| base::RunLoop().RunUntilIdle(); |
| - io_message_loop_.RunUntilIdle(); |
| base::RunLoop().RunUntilIdle(); |
| - io_message_loop_.RunUntilIdle(); |
| + base::RunLoop().RunUntilIdle(); |
| + base::RunLoop().RunUntilIdle(); |
| base::RunLoop().RunUntilIdle(); |
|
gab
2016/08/05 01:09:57
This doesn't make sense anymore (I guess the logic
fdoray
2016/08/05 16:10:35
Multiple RunUntilIdle in a row really doesn't make
|
| CheckSuggestionsData(); |
| } |