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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc

Issue 10073005: gdata: Remove OnDirectoryChanged from MockGDataSyncClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « no previous file | chrome/browser/chromeos/gdata/mock_gdata_sync_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
index f0fb5557758dbcb242393f39cb6d03fb08e72548..dba52ac306fb18bdc5e616de759b0ee4d7199907 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
@@ -1309,9 +1309,6 @@ TEST_F(GDataFileSystemTest, RenameFile) {
base::Bind(&CallbackHelper::FileOperationCallback,
callback_helper_.get());
- EXPECT_CALL(*mock_sync_client_, OnDirectoryChanged(
- Eq(FilePath(FILE_PATH_LITERAL("gdata/Directory 1"))))).Times(1);
-
file_system_->Move(src_file_path, dest_file_path, callback);
message_loop_.RunAllPending();
EXPECT_EQ(base::PLATFORM_FILE_OK, callback_helper_->last_error_);
@@ -1354,12 +1351,6 @@ TEST_F(GDataFileSystemTest, MoveFileFromRootToSubDirectory) {
base::Bind(&CallbackHelper::FileOperationCallback,
callback_helper_.get());
- // Expect notification for both source and destination directories.
- EXPECT_CALL(*mock_sync_client_, OnDirectoryChanged(
- Eq(FilePath(FILE_PATH_LITERAL("gdata"))))).Times(1);
- EXPECT_CALL(*mock_sync_client_, OnDirectoryChanged(
- Eq(FilePath(FILE_PATH_LITERAL("gdata/Directory 1"))))).Times(1);
-
file_system_->Move(src_file_path, dest_file_path, callback);
message_loop_.RunAllPending();
EXPECT_EQ(base::PLATFORM_FILE_OK, callback_helper_->last_error_);
@@ -1404,12 +1395,6 @@ TEST_F(GDataFileSystemTest, MoveFileFromSubDirectoryToRoot) {
base::Bind(&CallbackHelper::FileOperationCallback,
callback_helper_.get());
- // Expect notification for both source and destination directories.
- EXPECT_CALL(*mock_sync_client_, OnDirectoryChanged(
- Eq(FilePath(FILE_PATH_LITERAL("gdata"))))).Times(1);
- EXPECT_CALL(*mock_sync_client_, OnDirectoryChanged(
- Eq(FilePath(FILE_PATH_LITERAL("gdata/Directory 1"))))).Times(1);
-
file_system_->Move(src_file_path, dest_file_path, callback);
message_loop_.RunAllPending();
EXPECT_EQ(base::PLATFORM_FILE_OK, callback_helper_->last_error_);
@@ -1432,9 +1417,6 @@ TEST_F(GDataFileSystemTest, MoveFileBetweenSubDirectories) {
LoadRootFeedDocument("root_feed.json");
- EXPECT_CALL(*mock_sync_client_, OnDirectoryChanged(
- Eq(FilePath(FILE_PATH_LITERAL("gdata"))))).Times(1);
-
AddDirectoryFromFile(dest_parent_path, "directory_entry_atom.json");
GDataFileBase* src_file = NULL;
@@ -1471,15 +1453,6 @@ TEST_F(GDataFileSystemTest, MoveFileBetweenSubDirectories) {
base::Bind(&CallbackHelper::FileOperationCallback,
callback_helper_.get());
- // Expect notification for both source and destination directories plus
- // interim file path.
- EXPECT_CALL(*mock_sync_client_, OnDirectoryChanged(
- Eq(FilePath(FILE_PATH_LITERAL("gdata/Directory 1"))))).Times(1);
- EXPECT_CALL(*mock_sync_client_, OnDirectoryChanged(
- Eq(FilePath(FILE_PATH_LITERAL("gdata"))))).Times(1);
- EXPECT_CALL(*mock_sync_client_, OnDirectoryChanged(
- Eq(FilePath(FILE_PATH_LITERAL("gdata/New Folder 1"))))).Times(1);
-
file_system_->Move(src_file_path, dest_file_path, callback);
message_loop_.RunAllPending();
EXPECT_EQ(base::PLATFORM_FILE_OK, callback_helper_->last_error_);
@@ -1606,10 +1579,6 @@ TEST_F(GDataFileSystemTest, RemoveFiles) {
std::string file_in_subdir_resource = file->AsGDataFile()->resource_id();
EXPECT_EQ(file, FindFileByResourceId(file_in_subdir_resource));
- // Once for file in root and once for file...
- EXPECT_CALL(*mock_sync_client_, OnDirectoryChanged(
- Eq(FilePath(FILE_PATH_LITERAL("gdata"))))).Times(2);
-
// Remove first file in root.
EXPECT_TRUE(RemoveFile(file_in_root));
EXPECT_TRUE(FindFile(file_in_root) == NULL);
@@ -1642,18 +1611,12 @@ TEST_F(GDataFileSystemTest, RemoveFiles) {
TEST_F(GDataFileSystemTest, CreateDirectory) {
LoadRootFeedDocument("root_feed.json");
- EXPECT_CALL(*mock_sync_client_, OnDirectoryChanged(
- Eq(FilePath(FILE_PATH_LITERAL("gdata"))))).Times(1);
-
// Create directory in root.
FilePath dir_path(FILE_PATH_LITERAL("gdata/New Folder 1"));
EXPECT_TRUE(FindFile(dir_path) == NULL);
AddDirectoryFromFile(dir_path, "directory_entry_atom.json");
EXPECT_TRUE(FindFile(dir_path) != NULL);
- EXPECT_CALL(*mock_sync_client_, OnDirectoryChanged(
- Eq(FilePath(FILE_PATH_LITERAL("gdata/New Folder 1"))))).Times(1);
-
// Create directory in a sub dirrectory.
FilePath subdir_path(FILE_PATH_LITERAL("gdata/New Folder 1/New Folder 2"));
EXPECT_TRUE(FindFile(subdir_path) == NULL);
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/mock_gdata_sync_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698