Index: chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc |
diff --git a/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc b/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc |
index b930b2df2e8630b2790ba926e0103444976e73eb..566d44e69a53226273ab3dfa89cc973ab8ebcb10 100644 |
--- a/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc |
+++ b/chrome/browser/chromeos/drive/file_system/open_file_operation_unittest.cc |
@@ -28,7 +28,7 @@ class OpenFileOperationTest : public OperationTestBase { |
OperationTestBase::SetUp(); |
operation_.reset(new OpenFileOperation( |
- blocking_task_runner(), observer(), scheduler(), metadata(), cache(), |
+ blocking_task_runner(), delegate(), scheduler(), metadata(), cache(), |
temp_dir())); |
} |
@@ -61,7 +61,7 @@ TEST_F(OpenFileOperationTest, OpenExistingFile) { |
ASSERT_FALSE(close_callback.is_null()); |
close_callback.Run(); |
- EXPECT_EQ(1U, observer()->updated_local_ids().count(src_entry.local_id())); |
+ EXPECT_EQ(1U, delegate()->updated_local_ids().count(src_entry.local_id())); |
} |
TEST_F(OpenFileOperationTest, OpenNonExistingFile) { |
@@ -118,8 +118,8 @@ TEST_F(OpenFileOperationTest, CreateNonExistingFile) { |
&error, &file_path, &close_callback)); |
content::RunAllBlockingPoolTasksUntilIdle(); |
- EXPECT_EQ(1U, observer()->get_changed_files().size()); |
- EXPECT_TRUE(observer()->get_changed_files().count(file_in_root)); |
+ EXPECT_EQ(1U, delegate()->get_changed_files().size()); |
+ EXPECT_TRUE(delegate()->get_changed_files().count(file_in_root)); |
EXPECT_EQ(FILE_ERROR_OK, error); |
ASSERT_TRUE(base::PathExists(file_path)); |
@@ -130,7 +130,7 @@ TEST_F(OpenFileOperationTest, CreateNonExistingFile) { |
ASSERT_FALSE(close_callback.is_null()); |
close_callback.Run(); |
EXPECT_EQ(1U, |
- observer()->updated_local_ids().count(GetLocalId(file_in_root))); |
+ delegate()->updated_local_ids().count(GetLocalId(file_in_root))); |
} |
TEST_F(OpenFileOperationTest, OpenOrCreateExistingFile) { |
@@ -152,8 +152,8 @@ TEST_F(OpenFileOperationTest, OpenOrCreateExistingFile) { |
content::RunAllBlockingPoolTasksUntilIdle(); |
// Notified because 'available offline' status of the existing file changes. |
- EXPECT_EQ(1U, observer()->get_changed_files().size()); |
- EXPECT_TRUE(observer()->get_changed_files().count(file_in_root)); |
+ EXPECT_EQ(1U, delegate()->get_changed_files().size()); |
+ EXPECT_TRUE(delegate()->get_changed_files().count(file_in_root)); |
EXPECT_EQ(FILE_ERROR_OK, error); |
ASSERT_TRUE(base::PathExists(file_path)); |
@@ -163,7 +163,7 @@ TEST_F(OpenFileOperationTest, OpenOrCreateExistingFile) { |
ASSERT_FALSE(close_callback.is_null()); |
close_callback.Run(); |
- EXPECT_EQ(1U, observer()->updated_local_ids().count(src_entry.local_id())); |
+ EXPECT_EQ(1U, delegate()->updated_local_ids().count(src_entry.local_id())); |
ResourceEntry result_entry; |
EXPECT_EQ(FILE_ERROR_OK, GetLocalResourceEntry(file_in_root, &result_entry)); |
@@ -195,7 +195,7 @@ TEST_F(OpenFileOperationTest, OpenOrCreateNonExistingFile) { |
ASSERT_FALSE(close_callback.is_null()); |
close_callback.Run(); |
EXPECT_EQ(1U, |
- observer()->updated_local_ids().count(GetLocalId(file_in_root))); |
+ delegate()->updated_local_ids().count(GetLocalId(file_in_root))); |
} |
TEST_F(OpenFileOperationTest, OpenFileTwice) { |
@@ -245,12 +245,12 @@ TEST_F(OpenFileOperationTest, OpenFileTwice) { |
// There still remains a client opening the file, so it shouldn't be |
// uploaded yet. |
- EXPECT_TRUE(observer()->updated_local_ids().empty()); |
+ EXPECT_TRUE(delegate()->updated_local_ids().empty()); |
close_callback2.Run(); |
// Here, all the clients close the file, so it should be uploaded then. |
- EXPECT_EQ(1U, observer()->updated_local_ids().count(src_entry.local_id())); |
+ EXPECT_EQ(1U, delegate()->updated_local_ids().count(src_entry.local_id())); |
} |
} // namespace file_system |