| 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" | 7 #include "base/file_util.h" |
| 8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/platform_file.h" | |
| 11 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 12 #include "content/browser/browser_thread_impl.h" | 11 #include "content/browser/browser_thread_impl.h" |
| 13 #include "content/browser/loader/redirect_to_file_resource_handler.h" | 12 #include "content/browser/loader/redirect_to_file_resource_handler.h" |
| 14 #include "content/browser/loader/resource_loader_delegate.h" | 13 #include "content/browser/loader/resource_loader_delegate.h" |
| 15 #include "content/public/browser/resource_request_info.h" | 14 #include "content/public/browser/resource_request_info.h" |
| 16 #include "content/public/common/resource_response.h" | 15 #include "content/public/common/resource_response.h" |
| 17 #include "content/public/test/mock_resource_context.h" | 16 #include "content/public/test/mock_resource_context.h" |
| 18 #include "content/public/test/test_browser_thread_bundle.h" | 17 #include "content/public/test/test_browser_thread_bundle.h" |
| 19 #include "content/test/test_content_browser_client.h" | 18 #include "content/test/test_content_browser_client.h" |
| 20 #include "ipc/ipc_message.h" | 19 #include "ipc/ipc_message.h" |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents)); | 734 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents)); |
| 736 EXPECT_EQ(test_data(), contents); | 735 EXPECT_EQ(test_data(), contents); |
| 737 | 736 |
| 738 // Release the loader. The file should be gone now. | 737 // Release the loader. The file should be gone now. |
| 739 ReleaseLoader(); | 738 ReleaseLoader(); |
| 740 base::RunLoop().RunUntilIdle(); | 739 base::RunLoop().RunUntilIdle(); |
| 741 EXPECT_FALSE(base::PathExists(temp_path())); | 740 EXPECT_FALSE(base::PathExists(temp_path())); |
| 742 } | 741 } |
| 743 | 742 |
| 744 } // namespace content | 743 } // namespace content |
| OLD | NEW |