Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: webkit/fileapi/file_system_file_util_unittest.cc

Issue 9616033: Merge CrossFileUtilHelper to FileUtilHelper as Copy() and Move(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/file_system_file_util_proxy.cc ('k') | webkit/fileapi/file_system_test_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_file_util_unittest.cc
diff --git a/webkit/fileapi/file_system_file_util_unittest.cc b/webkit/fileapi/file_system_file_util_unittest.cc
index 40cd803d3dca6ae1e3a35071daa933c9bf4770b6..707ea715c0bb4c01ec0e50eeb7e9bc9a3ad91fee 100644
--- a/webkit/fileapi/file_system_file_util_unittest.cc
+++ b/webkit/fileapi/file_system_file_util_unittest.cc
@@ -8,10 +8,10 @@
#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"
+#include "webkit/fileapi/file_util_helper.h"
#include "webkit/fileapi/native_file_util.h"
#include "webkit/fileapi/obfuscated_file_util.h"
#include "webkit/fileapi/test_file_set.h"
@@ -90,15 +90,21 @@ class FileSystemFileUtilTest : public testing::Test {
src_helper.NewOperationContext());
copy_context->set_allowed_bytes_growth(1024 * 1024); // OFSFU path quota.
- 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());
+ if (copy) {
+ ASSERT_EQ(
+ base::PLATFORM_FILE_OK,
+ FileUtilHelper::Copy(
+ copy_context.get(),
+ src_helper.file_util(), dest_helper.file_util(),
+ src_root, dest_root));
+ } else {
+ ASSERT_EQ(
+ base::PLATFORM_FILE_OK,
+ FileUtilHelper::Move(
+ copy_context.get(),
+ src_helper.file_util(), dest_helper.file_util(),
+ src_root, dest_root));
+ }
// Validate that the destination paths are correct.
for (size_t i = 0; i < test::kRegularTestCaseSize; ++i) {
« no previous file with comments | « webkit/fileapi/file_system_file_util_proxy.cc ('k') | webkit/fileapi/file_system_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698