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

Unified Diff: chrome/browser/chromeos/drive/file_system_unittest.cc

Issue 15817003: drive: Use OperationTestBase from CreateDirectoryOperationTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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 | « chrome/browser/chromeos/drive/file_system/create_directory_operation_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/file_system_unittest.cc
diff --git a/chrome/browser/chromeos/drive/file_system_unittest.cc b/chrome/browser/chromeos/drive/file_system_unittest.cc
index 5b4e4879159ca204027c2082951222f33e54a796..caadf8c887b19c293a1bb6bc1bfc5910bc8e4a3b 100644
--- a/chrome/browser/chromeos/drive/file_system_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system_unittest.cc
@@ -161,16 +161,6 @@ class FileSystemTest : public testing::Test {
return true;
}
- FileError AddDirectory(const base::FilePath& directory_path) {
- FileError error = FILE_ERROR_FAILED;
- file_system_->CreateDirectory(
- directory_path,
- false, // is_exclusive
- false, // is_recursive
- google_apis::test_util::CreateCopyResultCallback(&error));
- google_apis::test_util::RunBlockingPoolTask();
- return error;
- }
// Gets resource entry by path synchronously.
scoped_ptr<ResourceEntry> GetResourceEntryByPathSync(
@@ -1127,30 +1117,6 @@ TEST_F(FileSystemTest, CopyFileToInvalidPath) {
EXPECT_FALSE(EntryExists(dest_file_path));
}
-TEST_F(FileSystemTest, CreateDirectory) {
- ASSERT_TRUE(LoadRootFeedDocument());
-
- EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
- Eq(base::FilePath(FILE_PATH_LITERAL("drive/root"))))).Times(1);
-
- // Create directory in root.
- base::FilePath dir_path(FILE_PATH_LITERAL("drive/root/New Folder 1"));
- EXPECT_FALSE(EntryExists(dir_path));
- EXPECT_EQ(FILE_ERROR_OK, AddDirectory(dir_path));
- EXPECT_TRUE(EntryExists(dir_path));
-
- EXPECT_CALL(*mock_directory_observer_, OnDirectoryChanged(
- Eq(base::FilePath(FILE_PATH_LITERAL("drive/root/New Folder 1")))))
- .Times(1);
-
- // Create directory in a sub directory.
- base::FilePath subdir_path(
- FILE_PATH_LITERAL("drive/root/New Folder 1/New Folder 2"));
- EXPECT_FALSE(EntryExists(subdir_path));
- EXPECT_EQ(FILE_ERROR_OK, AddDirectory(subdir_path));
- EXPECT_TRUE(EntryExists(subdir_path));
-}
-
TEST_F(FileSystemTest, CreateDirectoryByImplicitLoad) {
// Intentionally *not* calling LoadRootFeedDocument(), for testing that
// CreateDirectory ensures feed loading before it runs.
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/create_directory_operation_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698