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

Unified Diff: services/files/directory_impl_unittest.cc

Issue 1150563003: Rename InterfacePtr's WaitForIncomingMethodCall() -> WaitForIncomingResponse(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 | « mojo/services/files/public/c/tests/test_utils.cc ('k') | services/files/file_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/files/directory_impl_unittest.cc
diff --git a/services/files/directory_impl_unittest.cc b/services/files/directory_impl_unittest.cc
index 1db55f1eff91b330991ae3b40d130353064ed17f..c6bd3f4f55e926a45a50e4a2bb2fbdf65095279f 100644
--- a/services/files/directory_impl_unittest.cc
+++ b/services/files/directory_impl_unittest.cc
@@ -31,7 +31,7 @@ TEST_F(DirectoryImplTest, Read) {
error = ERROR_INTERNAL;
directory->OpenFile(files_to_create[i].name, nullptr,
files_to_create[i].open_flags, Capture(&error));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
}
// Make a directory.
@@ -39,13 +39,13 @@ TEST_F(DirectoryImplTest, Read) {
directory->OpenDirectory("my_dir", nullptr,
kOpenFlagRead | kOpenFlagWrite | kOpenFlagCreate,
Capture(&error));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
error = ERROR_INTERNAL;
Array<DirectoryEntryPtr> directory_contents;
directory->Read(Capture(&error, &directory_contents));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
// Expected contents of the directory.
@@ -82,7 +82,7 @@ TEST_F(DirectoryImplTest, StatTouch) {
error = ERROR_INTERNAL;
FileInformationPtr file_info;
directory->Stat(Capture(&error, &file_info));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
ASSERT_FALSE(file_info.is_null());
EXPECT_EQ(FILE_TYPE_DIRECTORY, file_info->type);
@@ -101,14 +101,14 @@ TEST_F(DirectoryImplTest, StatTouch) {
const int64_t kPartyTime1 = 1234567890; // Party like it's 2009-02-13.
t->timespec->seconds = kPartyTime1;
directory->Touch(t.Pass(), nullptr, Capture(&error));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
// Stat again.
error = ERROR_INTERNAL;
file_info.reset();
directory->Stat(Capture(&error, &file_info));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
ASSERT_FALSE(file_info.is_null());
ASSERT_FALSE(file_info->atime.is_null());
@@ -123,14 +123,14 @@ TEST_F(DirectoryImplTest, StatTouch) {
const int64_t kPartyTime2 = 1425059525; // No time like the present.
t->timespec->seconds = kPartyTime2;
directory->Touch(nullptr, t.Pass(), Capture(&error));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
// Stat again.
error = ERROR_INTERNAL;
file_info.reset();
directory->Stat(Capture(&error, &file_info));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
ASSERT_FALSE(file_info.is_null());
ASSERT_FALSE(file_info->atime.is_null());
@@ -153,41 +153,41 @@ TEST_F(DirectoryImplTest, BasicRenameDelete) {
error = ERROR_INTERNAL;
directory->OpenFile("my_file", nullptr, kOpenFlagWrite | kOpenFlagCreate,
Capture(&error));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
// Opening my_file should succeed.
error = ERROR_INTERNAL;
directory->OpenFile("my_file", nullptr, kOpenFlagRead, Capture(&error));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
// Rename my_file to my_new_file.
directory->Rename("my_file", "my_new_file", Capture(&error));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
// Opening my_file should fail.
error = ERROR_INTERNAL;
directory->OpenFile("my_file", nullptr, kOpenFlagRead, Capture(&error));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_UNKNOWN, error);
// Opening my_new_file should succeed.
error = ERROR_INTERNAL;
directory->OpenFile("my_new_file", nullptr, kOpenFlagRead, Capture(&error));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
// Delete my_new_file (no flags).
directory->Delete("my_new_file", 0, Capture(&error));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_OK, error);
// Opening my_new_file should fail.
error = ERROR_INTERNAL;
directory->OpenFile("my_new_file", nullptr, kOpenFlagRead, Capture(&error));
- ASSERT_TRUE(directory.WaitForIncomingMethodCall());
+ ASSERT_TRUE(directory.WaitForIncomingResponse());
EXPECT_EQ(ERROR_UNKNOWN, error);
}
« no previous file with comments | « mojo/services/files/public/c/tests/test_utils.cc ('k') | services/files/file_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698