OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/browser/loader/resource_loader.h" | 5 #include "content/browser/loader/resource_loader.h" |
6 | 6 |
7 #include "base/file_util.h" | |
8 #include "base/files/file.h" | 7 #include "base/files/file.h" |
| 8 #include "base/files/file_util.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "content/browser/browser_thread_impl.h" | 11 #include "content/browser/browser_thread_impl.h" |
12 #include "content/browser/loader/redirect_to_file_resource_handler.h" | 12 #include "content/browser/loader/redirect_to_file_resource_handler.h" |
13 #include "content/browser/loader/resource_loader_delegate.h" | 13 #include "content/browser/loader/resource_loader_delegate.h" |
14 #include "content/public/browser/resource_request_info.h" | 14 #include "content/public/browser/resource_request_info.h" |
15 #include "content/public/common/resource_response.h" | 15 #include "content/public/common/resource_response.h" |
16 #include "content/public/test/mock_resource_context.h" | 16 #include "content/public/test/mock_resource_context.h" |
17 #include "content/public/test/test_browser_thread_bundle.h" | 17 #include "content/public/test/test_browser_thread_bundle.h" |
18 #include "content/test/test_content_browser_client.h" | 18 #include "content/test/test_content_browser_client.h" |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents)); | 722 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents)); |
723 EXPECT_EQ(test_data(), contents); | 723 EXPECT_EQ(test_data(), contents); |
724 | 724 |
725 // Release the loader. The file should be gone now. | 725 // Release the loader. The file should be gone now. |
726 ReleaseLoader(); | 726 ReleaseLoader(); |
727 base::RunLoop().RunUntilIdle(); | 727 base::RunLoop().RunUntilIdle(); |
728 EXPECT_FALSE(base::PathExists(temp_path())); | 728 EXPECT_FALSE(base::PathExists(temp_path())); |
729 } | 729 } |
730 | 730 |
731 } // namespace content | 731 } // namespace content |
OLD | NEW |