OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/url_request/url_fetcher_response_writer.h" | 5 #include "net/url_request/url_fetcher_response_writer.h" |
6 | 6 |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "net/base/io_buffer.h" | 11 #include "net/base/io_buffer.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "net/base/test_completion_callback.h" | 13 #include "net/base/test_completion_callback.h" |
14 #include "testing/platform_test.h" | 14 #include "testing/platform_test.h" |
15 | 15 |
16 namespace net { | 16 namespace net { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 const char kData[] = "Hello!"; | 20 const char kData[] = "Hello!"; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 EXPECT_EQ(kData, file_contents); | 171 EXPECT_EQ(kData, file_contents); |
172 | 172 |
173 // Destroy the writer. File should be deleted. | 173 // Destroy the writer. File should be deleted. |
174 const base::FilePath file_path = writer_->file_path(); | 174 const base::FilePath file_path = writer_->file_path(); |
175 writer_.reset(); | 175 writer_.reset(); |
176 base::RunLoop().RunUntilIdle(); | 176 base::RunLoop().RunUntilIdle(); |
177 EXPECT_FALSE(base::PathExists(file_path)); | 177 EXPECT_FALSE(base::PathExists(file_path)); |
178 } | 178 } |
179 | 179 |
180 } // namespace net | 180 } // namespace net |
OLD | NEW |