summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_file_util_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/fileapi/file_system_file_util_unittest.cc')
-rw-r--r--webkit/fileapi/file_system_file_util_unittest.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/webkit/fileapi/file_system_file_util_unittest.cc b/webkit/fileapi/file_system_file_util_unittest.cc
index 13071d4..40cd803 100644
--- a/webkit/fileapi/file_system_file_util_unittest.cc
+++ b/webkit/fileapi/file_system_file_util_unittest.cc
@@ -8,6 +8,7 @@
#include "base/platform_file.h"
#include "base/scoped_temp_dir.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "webkit/fileapi/cross_file_util_helper.h"
#include "webkit/fileapi/file_system_context.h"
#include "webkit/fileapi/file_system_operation_context.h"
#include "webkit/fileapi/file_system_test_helper.h"
@@ -89,12 +90,15 @@ class FileSystemFileUtilTest : public testing::Test {
src_helper.NewOperationContext());
copy_context->set_allowed_bytes_growth(1024 * 1024); // OFSFU path quota.
- if (copy)
- ASSERT_EQ(base::PLATFORM_FILE_OK,
- file_util->Copy(copy_context.get(), src_root, dest_root));
- else
- ASSERT_EQ(base::PLATFORM_FILE_OK,
- file_util->Move(copy_context.get(), src_root, dest_root));
+ CrossFileUtilHelper cross_util_helper(
+ copy_context.get(),
+ src_helper.file_util(),
+ dest_helper.file_util(),
+ src_root,
+ dest_root,
+ copy ? CrossFileUtilHelper::OPERATION_COPY
+ : CrossFileUtilHelper::OPERATION_MOVE);
+ ASSERT_EQ(base::PLATFORM_FILE_OK, cross_util_helper.DoWork());
// Validate that the destination paths are correct.
for (size_t i = 0; i < test::kRegularTestCaseSize; ++i) {