| Index: net/http/http_stream_parser_unittest.cc
|
| diff --git a/net/http/http_stream_parser_unittest.cc b/net/http/http_stream_parser_unittest.cc
|
| index 012960606c1115f65f9555d18d76ccca04895d28..b431549fe83337713fc9f6c743cd97636a2e36d7 100644
|
| --- a/net/http/http_stream_parser_unittest.cc
|
| +++ b/net/http/http_stream_parser_unittest.cc
|
| @@ -146,16 +146,15 @@ TEST(HttpStreamParser, ShouldMergeRequestHeadersAndBody_ChunkedBody) {
|
| }
|
|
|
| TEST(HttpStreamParser, ShouldMergeRequestHeadersAndBody_FileBody) {
|
| + // Create an empty temporary file.
|
| + base::ScopedTempDir temp_dir;
|
| + ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| + base::FilePath temp_file_path;
|
| + ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir.path(), &temp_file_path));
|
| +
|
| {
|
| ScopedVector<UploadElementReader> element_readers;
|
|
|
| - // Create an empty temporary file.
|
| - base::ScopedTempDir temp_dir;
|
| - ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| - base::FilePath temp_file_path;
|
| - ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir.path(),
|
| - &temp_file_path));
|
| -
|
| element_readers.push_back(
|
| new UploadFileElementReader(base::ThreadTaskRunnerHandle::Get().get(),
|
| temp_file_path, 0, 0, base::Time()));
|
| @@ -169,6 +168,7 @@ TEST(HttpStreamParser, ShouldMergeRequestHeadersAndBody_FileBody) {
|
| ASSERT_FALSE(HttpStreamParser::ShouldMergeRequestHeadersAndBody(
|
| "some header", body.get()));
|
| }
|
| +
|
| // UploadFileElementReaders may post clean-up tasks on destruction.
|
| base::RunLoop().RunUntilIdle();
|
| }
|
|
|