| 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 "content/browser/loader/temporary_file_stream.h" | 5 #include "content/browser/loader/temporary_file_stream.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
| 15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
| 16 #include "content/public/test/test_browser_thread_bundle.h" | 16 #include "content/public/test/test_browser_thread_bundle.h" |
| 17 #include "net/base/file_stream.h" | 17 #include "net/base/file_stream.h" |
| 18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
| 19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
| 20 #include "net/base/test_completion_callback.h" | 20 #include "net/base/test_completion_callback.h" |
| 21 #include "storage/common/blob/shareable_file_reference.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
| 22 #include "webkit/common/blob/shareable_file_reference.h" | |
| 23 | 23 |
| 24 using storage::ShareableFileReference; | 24 using storage::ShareableFileReference; |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 const char kTestData[] = "0123456789"; | 30 const char kTestData[] = "0123456789"; |
| 31 const int kTestDataSize = arraysize(kTestData) - 1; | 31 const int kTestDataSize = arraysize(kTestData) - 1; |
| 32 | 32 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 // Release everything. The file should be gone now. | 112 // Release everything. The file should be gone now. |
| 113 file_stream_waiter.Release(); | 113 file_stream_waiter.Release(); |
| 114 base::MessageLoop::current()->RunUntilIdle(); | 114 base::MessageLoop::current()->RunUntilIdle(); |
| 115 | 115 |
| 116 // The temporary should be gone now. | 116 // The temporary should be gone now. |
| 117 EXPECT_FALSE(base::PathExists(file_path)); | 117 EXPECT_FALSE(base::PathExists(file_path)); |
| 118 } | 118 } |
| 119 | 119 |
| 120 } // content | 120 } // content |
| OLD | NEW |