| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/platform_file.h" | 11 #include "base/platform_file.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include "webkit/blob/scoped_file.h" | 13 #include "webkit/blob/scoped_file.h" |
| 14 #include "webkit/browser/fileapi/transient_file_util.h" |
| 14 #include "webkit/fileapi/file_system_context.h" | 15 #include "webkit/fileapi/file_system_context.h" |
| 15 #include "webkit/fileapi/file_system_operation_context.h" | 16 #include "webkit/fileapi/file_system_operation_context.h" |
| 16 #include "webkit/fileapi/isolated_context.h" | 17 #include "webkit/fileapi/isolated_context.h" |
| 17 #include "webkit/fileapi/mock_file_system_context.h" | 18 #include "webkit/fileapi/mock_file_system_context.h" |
| 18 #include "webkit/fileapi/transient_file_util.h" | |
| 19 | 19 |
| 20 namespace fileapi { | 20 namespace fileapi { |
| 21 | 21 |
| 22 class TransientFileUtilTest : public testing::Test { | 22 class TransientFileUtilTest : public testing::Test { |
| 23 public: | 23 public: |
| 24 TransientFileUtilTest() {} | 24 TransientFileUtilTest() {} |
| 25 virtual ~TransientFileUtilTest() {} | 25 virtual ~TransientFileUtilTest() {} |
| 26 | 26 |
| 27 virtual void SetUp() OVERRIDE { | 27 virtual void SetUp() OVERRIDE { |
| 28 file_system_context_ = CreateFileSystemContextForTesting( | 28 file_system_context_ = CreateFileSystemContextForTesting( |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 MessageLoop::current()->RunUntilIdle(); | 113 MessageLoop::current()->RunUntilIdle(); |
| 114 | 114 |
| 115 // Now the temporary file and the transient filesystem must be gone too. | 115 // Now the temporary file and the transient filesystem must be gone too. |
| 116 ASSERT_FALSE(file_util::PathExists(temp_path)); | 116 ASSERT_FALSE(file_util::PathExists(temp_path)); |
| 117 ASSERT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, | 117 ASSERT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, |
| 118 file_util()->GetFileInfo(NewOperationContext().get(), | 118 file_util()->GetFileInfo(NewOperationContext().get(), |
| 119 temp_url, &file_info, &path)); | 119 temp_url, &file_info, &path)); |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace fileapi | 122 } // namespace fileapi |
| OLD | NEW |