| Index: webkit/browser/fileapi/copy_or_move_file_validator_unittest.cc
|
| diff --git a/webkit/browser/fileapi/copy_or_move_file_validator_unittest.cc b/webkit/browser/fileapi/copy_or_move_file_validator_unittest.cc
|
| index b971fd57c1a9f0f72b517fc1a3e186d78b76e71c..45c66af4ccd04a4d631c7568fd195b0b621c8fd9 100644
|
| --- a/webkit/browser/fileapi/copy_or_move_file_validator_unittest.cc
|
| +++ b/webkit/browser/fileapi/copy_or_move_file_validator_unittest.cc
|
| @@ -18,6 +18,7 @@
|
| #include "webkit/browser/fileapi/mock_file_system_context.h"
|
| #include "webkit/browser/fileapi/test_mount_point_provider.h"
|
| #include "webkit/browser/quota/mock_special_storage_policy.h"
|
| +#include "webkit/common/blob/shareable_file_reference.h"
|
| #include "webkit/common/fileapi/file_system_util.h"
|
|
|
| namespace fileapi {
|
| @@ -196,7 +197,9 @@ class TestCopyOrMoveFileValidatorFactory
|
| public:
|
| explicit TestCopyOrMoveFileValidator(bool all_valid)
|
| : result_(all_valid ? base::PLATFORM_FILE_OK
|
| - : base::PLATFORM_FILE_ERROR_SECURITY) {
|
| + : base::PLATFORM_FILE_ERROR_SECURITY),
|
| + write_result_(all_valid ? base::PLATFORM_FILE_OK
|
| + : base::PLATFORM_FILE_ERROR_SECURITY) {
|
| }
|
| virtual ~TestCopyOrMoveFileValidator() {}
|
|
|
| @@ -207,8 +210,18 @@ class TestCopyOrMoveFileValidatorFactory
|
| FROM_HERE, base::Bind(result_callback, result_));
|
| }
|
|
|
| + virtual void StartPostWriteValidation(
|
| + const base::FilePath& dest_platform_path,
|
| + scoped_refptr<webkit_blob::ShareableFileReference> file_ref,
|
| + const ResultCallback& result_callback) OVERRIDE {
|
| + // Post the result since a real validator must do work asynchronously.
|
| + base::MessageLoop::current()->PostTask(
|
| + FROM_HERE, base::Bind(result_callback, write_result_));
|
| + }
|
| +
|
| private:
|
| base::PlatformFileError result_;
|
| + base::PlatformFileError write_result_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TestCopyOrMoveFileValidator);
|
| };
|
|
|