Chromium Code Reviews| Index: content/browser/download/download_item_impl_unittest.cc |
| diff --git a/content/browser/download/download_item_impl_unittest.cc b/content/browser/download/download_item_impl_unittest.cc |
| index 1d10e52f4946c3627b33d0518e63e64d5e78071e..ee76123fcf964d1e8b1eee5e1c47c5b51bebe371 100644 |
| --- a/content/browser/download/download_item_impl_unittest.cc |
| +++ b/content/browser/download/download_item_impl_unittest.cc |
| @@ -35,6 +35,7 @@ |
| #include "content/public/test/mock_download_item.h" |
| #include "content/public/test/test_browser_context.h" |
| #include "content/public/test/test_browser_thread_bundle.h" |
| +#include "content/public/test/test_utils.h" |
| #include "content/public/test/web_contents_tester.h" |
| #include "crypto/secure_hash.h" |
| #include "net/http/http_response_headers.h" |
| @@ -393,7 +394,7 @@ class DownloadItemTest : public testing::Test { |
| allocated_downloads_.erase(item); |
| } |
| - void RunAllPendingInMessageLoops() { base::RunLoop().RunUntilIdle(); } |
| + void RunAllPendingInMessageLoops() { RunAllBlockingPoolTasksUntilIdle(); } |
|
gab
2017/06/21 19:42:24
inline below instead of having this indirection?
Sigurður Ásgeirsson
2017/06/22 14:50:09
Done.
|
| MockDelegate* mock_delegate() { |
| return &delegate_; |
| @@ -815,6 +816,8 @@ TEST_F(DownloadItemTest, AutomaticResumption_AttemptLimit) { |
| mock_download_file_ref = mock_download_file.get(); |
| mock_request_handle = base::MakeUnique<NiceMock<MockRequestHandle>>(); |
| + EXPECT_CALL(*mock_download_file, Initialize(_, _, _, _)) |
| + .WillOnce(ScheduleCallbackWithParam(DOWNLOAD_INTERRUPT_REASON_NONE)); |
|
gab
2017/06/21 19:42:24
Why is this changing?
Sigurður Ásgeirsson
2017/06/22 14:50:08
As-is, the default mock setup fires the callback o
|
| ON_CALL(*mock_download_file_ref, FullPath()) |
| .WillByDefault(ReturnRefOfCopy(base::FilePath())); |