| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/stl_util.h" | 5 #include "base/stl_util.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
| 7 #include "webkit/fileapi/file_system_context.h" | 7 #include "webkit/fileapi/file_system_context.h" |
| 8 #include "webkit/fileapi/file_system_task_runners.h" | 8 #include "webkit/fileapi/file_system_task_runners.h" |
| 9 #include "webkit/fileapi/file_system_types.h" | 9 #include "webkit/fileapi/file_system_types.h" |
| 10 #include "webkit/fileapi/isolated_context.h" | 10 #include "webkit/fileapi/isolated_context.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 261 |
| 262 operation_context.reset(other_file_system_.NewOperationContext()); | 262 operation_context.reset(other_file_system_.NewOperationContext()); |
| 263 operation_context->set_allowed_bytes_growth(1024); | 263 operation_context->set_allowed_bytes_growth(1024); |
| 264 EXPECT_EQ(base::PLATFORM_FILE_OK, | 264 EXPECT_EQ(base::PLATFORM_FILE_OK, |
| 265 other_file_system_.file_util()->EnsureFileExists( | 265 other_file_system_.file_util()->EnsureFileExists( |
| 266 operation_context.get(), kSrcChild, &created)); | 266 operation_context.get(), kSrcChild, &created)); |
| 267 EXPECT_TRUE(created); | 267 EXPECT_TRUE(created); |
| 268 | 268 |
| 269 // Now try copying the directory into the syncable file system, which should | 269 // Now try copying the directory into the syncable file system, which should |
| 270 // fail if directory operation is disabled. (http://crbug.com/161442) | 270 // fail if directory operation is disabled. (http://crbug.com/161442) |
| 271 EXPECT_EQ(base::PLATFORM_FILE_ERROR_INVALID_OPERATION, | 271 EXPECT_NE(base::PLATFORM_FILE_OK, |
| 272 file_system_.Copy(kSrcDir, URL("dest"))); | 272 file_system_.Copy(kSrcDir, URL("dest"))); |
| 273 | 273 |
| 274 other_file_system_.TearDown(); | 274 other_file_system_.TearDown(); |
| 275 } | 275 } |
| 276 | 276 |
| 277 } // namespace fileapi | 277 } // namespace fileapi |
| OLD | NEW |