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

Unified Diff: content/browser/download/download_file_unittest.cc

Issue 2082343002: Remove calls to deprecated MessageLoop methods in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Created 4 years, 6 months 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
Index: content/browser/download/download_file_unittest.cc
diff --git a/content/browser/download/download_file_unittest.cc b/content/browser/download/download_file_unittest.cc
index f37e9e70fb5015ff6e10483497c06b2903cab19b..9ad3ae5b8bd4be7825db4caf8115c11ad107e9a0 100644
--- a/content/browser/download/download_file_unittest.cc
+++ b/content/browser/download/download_file_unittest.cc
@@ -286,7 +286,7 @@ class DownloadFileTest : public testing::Test {
if (check_observer) {
EXPECT_CALL(*(observer_.get()),
MockDestinationCompleted(_, expected_hash));
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
::testing::Mock::VerifyAndClearExpectations(observer_.get());
EXPECT_CALL(*(observer_.get()), DestinationUpdate(_, _))
.Times(AnyNumber())
@@ -488,7 +488,7 @@ TEST_P(DownloadFileTestWithRename, RenameFileFinal) {
EXPECT_TRUE(base::PathExists(path_3));
FinishStream(DOWNLOAD_INTERRUPT_REASON_NONE, true, kDataHash);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
// Rename the file after downloading all the data and closing the file.
EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_NONE,
@@ -529,7 +529,7 @@ TEST_F(DownloadFileTest, RenameOverwrites) {
EXPECT_NE(std::string(file_data), file_contents);
FinishStream(DOWNLOAD_INTERRUPT_REASON_NONE, true, kEmptyHash);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
DestroyDownloadFile(0);
}
@@ -554,7 +554,7 @@ TEST_F(DownloadFileTest, RenameUniquifies) {
EXPECT_TRUE(base::PathExists(path_1_suffixed));
FinishStream(DOWNLOAD_INTERRUPT_REASON_NONE, true, kEmptyHash);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
DestroyDownloadFile(0);
}
@@ -571,7 +571,7 @@ TEST_F(DownloadFileTest, RenameRecognizesSelfConflict) {
EXPECT_TRUE(base::PathExists(initial_path));
FinishStream(DOWNLOAD_INTERRUPT_REASON_NONE, true, kEmptyHash);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
DestroyDownloadFile(0);
EXPECT_EQ(initial_path.value(), new_path.value());
}
@@ -606,7 +606,7 @@ TEST_P(DownloadFileTestWithRename, RenameError) {
}
FinishStream(DOWNLOAD_INTERRUPT_REASON_NONE, true, kEmptyHash);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
DestroyDownloadFile(0);
}
@@ -699,7 +699,7 @@ TEST_P(DownloadFileTestWithRename, RenameWithErrorRetry) {
EXPECT_TRUE(did_run_callback);
FinishStream(DOWNLOAD_INTERRUPT_REASON_NONE, true, kEmptyHash);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
DestroyDownloadFile(0);
}
@@ -715,7 +715,7 @@ TEST_F(DownloadFileTest, StreamEmptySuccess) {
// Finish the download this way and make sure we see it on the observer.
FinishStream(DOWNLOAD_INTERRUPT_REASON_NONE, true, kEmptyHash);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
DestroyDownloadFile(0);
}
@@ -744,7 +744,7 @@ TEST_F(DownloadFileTest, StreamEmptyError) {
FinishStream(
DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED, false, kEmptyHash);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
DestroyDownloadFile(0);
}
@@ -761,7 +761,7 @@ TEST_F(DownloadFileTest, StreamNonEmptySuccess) {
EXPECT_CALL(*(observer_.get()), MockDestinationCompleted(_, _));
sink_callback_.Run();
VerifyStreamAndSize();
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
DestroyDownloadFile(0);
}
@@ -790,7 +790,7 @@ TEST_F(DownloadFileTest, StreamNonEmptyError) {
CurrentUpdateStatus(strlen(kTestData1) + strlen(kTestData2), _));
sink_callback_.Run();
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
VerifyStreamAndSize();
DestroyDownloadFile(0);
}
« no previous file with comments | « content/browser/download/download_browsertest.cc ('k') | content/browser/fileapi/file_system_dir_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698