| Index: webkit/fileapi/local_file_util_unittest.cc
|
| diff --git a/webkit/fileapi/local_file_util_unittest.cc b/webkit/fileapi/local_file_util_unittest.cc
|
| index 0d7df0358790cd665c011acbf62d33fa513b4c7d..758268710475d9fa22f9df0a2e528ebc977694cd 100644
|
| --- a/webkit/fileapi/local_file_util_unittest.cc
|
| +++ b/webkit/fileapi/local_file_util_unittest.cc
|
| @@ -12,6 +12,7 @@
|
| #include "base/sys_string_conversions.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| +#include "webkit/fileapi/async_file_test_helper.h"
|
| #include "webkit/fileapi/file_system_context.h"
|
| #include "webkit/fileapi/file_system_file_util.h"
|
| #include "webkit/fileapi/file_system_operation_context.h"
|
| @@ -94,6 +95,10 @@ class LocalFileUtilTest : public testing::Test {
|
| return test_helper_;
|
| }
|
|
|
| + FileSystemContext* file_system_context() {
|
| + return test_helper_.file_system_context();
|
| + }
|
| +
|
| private:
|
| scoped_ptr<LocalFileUtil> local_file_util_;
|
| base::ScopedTempDir data_dir_;
|
| @@ -218,15 +223,14 @@ TEST_F(LocalFileUtilTest, CopyFile) {
|
| EXPECT_TRUE(FileExists(from_file));
|
| EXPECT_EQ(1020, GetSize(from_file));
|
|
|
| - context.reset(NewContext());
|
| ASSERT_EQ(base::PLATFORM_FILE_OK,
|
| - test_helper().SameFileUtilCopy(context.get(),
|
| - Path(from_file), Path(to_file1)));
|
| + AsyncFileTestHelper::Copy(file_system_context(),
|
| + Path(from_file), Path(to_file1)));
|
|
|
| context.reset(NewContext());
|
| ASSERT_EQ(base::PLATFORM_FILE_OK,
|
| - test_helper().SameFileUtilCopy(context.get(),
|
| - Path(from_file), Path(to_file2)));
|
| + AsyncFileTestHelper::Copy(file_system_context(),
|
| + Path(from_file), Path(to_file2)));
|
|
|
| EXPECT_TRUE(FileExists(from_file));
|
| EXPECT_EQ(1020, GetSize(from_file));
|
| @@ -261,8 +265,8 @@ TEST_F(LocalFileUtilTest, CopyDirectory) {
|
|
|
| context.reset(NewContext());
|
| ASSERT_EQ(base::PLATFORM_FILE_OK,
|
| - test_helper().SameFileUtilCopy(context.get(),
|
| - Path(from_dir), Path(to_dir)));
|
| + AsyncFileTestHelper::Copy(file_system_context(),
|
| + Path(from_dir), Path(to_dir)));
|
|
|
| EXPECT_TRUE(DirectoryExists(from_dir));
|
| EXPECT_TRUE(FileExists(from_file));
|
| @@ -289,8 +293,8 @@ TEST_F(LocalFileUtilTest, MoveFile) {
|
|
|
| context.reset(NewContext());
|
| ASSERT_EQ(base::PLATFORM_FILE_OK,
|
| - test_helper().SameFileUtilMove(context.get(),
|
| - Path(from_file), Path(to_file)));
|
| + AsyncFileTestHelper::Move(file_system_context(),
|
| + Path(from_file), Path(to_file)));
|
|
|
| EXPECT_FALSE(FileExists(from_file));
|
| EXPECT_TRUE(FileExists(to_file));
|
| @@ -322,8 +326,8 @@ TEST_F(LocalFileUtilTest, MoveDirectory) {
|
|
|
| context.reset(NewContext());
|
| ASSERT_EQ(base::PLATFORM_FILE_OK,
|
| - test_helper().SameFileUtilMove(context.get(),
|
| - Path(from_dir), Path(to_dir)));
|
| + AsyncFileTestHelper::Move(file_system_context(),
|
| + Path(from_dir), Path(to_dir)));
|
|
|
| EXPECT_FALSE(DirectoryExists(from_dir));
|
| EXPECT_TRUE(DirectoryExists(to_dir));
|
|
|