summaryrefslogtreecommitdiffstats
path: root/ppapi/tests/test_file_system.cc
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-15 11:06:23 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-15 11:06:23 +0000
commit599aeffdcddcd73fc4dff854631016438fd922c2 (patch)
tree94d4f0b041368f7af5e92e7a0c2720274e910481 /ppapi/tests/test_file_system.cc
parent9ffbb3ffc9220cd90e9aeaeb901963e1ba4922cc (diff)
downloadchromium_src-599aeffdcddcd73fc4dff854631016438fd922c2.zip
chromium_src-599aeffdcddcd73fc4dff854631016438fd922c2.tar.gz
chromium_src-599aeffdcddcd73fc4dff854631016438fd922c2.tar.bz2
Cleanup: Remove operator from TestCompletionCallback.
This change removes TestCompletionCallback::operator pp::CompletionCallback(), which made test code confusing to read, and allowed some strange static_cast<> hacks in tests. I tested this change by building ppapi_tests, browser_tests, and chrome. BUG= Review URL: https://chromiumcodereview.appspot.com/12824010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188334 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests/test_file_system.cc')
-rw-r--r--ppapi/tests/test_file_system.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/ppapi/tests/test_file_system.cc b/ppapi/tests/test_file_system.cc
index 3874295..9601f54 100644
--- a/ppapi/tests/test_file_system.cc
+++ b/ppapi/tests/test_file_system.cc
@@ -27,15 +27,15 @@ std::string TestFileSystem::TestOpen() {
// Open.
pp::FileSystem file_system(instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY);
- callback.WaitForResult(file_system.Open(1024, callback));
+ callback.WaitForResult(file_system.Open(1024, callback.GetCallback()));
CHECK_CALLBACK_BEHAVIOR(callback);
ASSERT_EQ(PP_OK, callback.result());
// Open aborted (see the DirectoryReader test for comments).
int32_t rv = 0;
{
- rv = pp::FileSystem(instance_,
- PP_FILESYSTEMTYPE_LOCALTEMPORARY).Open(1024, callback);
+ pp::FileSystem fs(instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY);
+ rv = fs.Open(1024, callback.GetCallback());
}
callback.WaitForAbortResult(rv);
CHECK_CALLBACK_BEHAVIOR(callback);
@@ -48,10 +48,10 @@ std::string TestFileSystem::TestMultipleOpens() {
// open has completed.
TestCompletionCallback callback_1(instance_->pp_instance(), force_async_);
pp::FileSystem file_system(instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY);
- int32_t rv_1 = file_system.Open(1024, callback_1);
+ int32_t rv_1 = file_system.Open(1024, callback_1.GetCallback());
TestCompletionCallback callback_2(instance_->pp_instance(), force_async_);
- callback_2.WaitForResult(file_system.Open(1024, callback_2));
+ callback_2.WaitForResult(file_system.Open(1024, callback_2.GetCallback()));
CHECK_CALLBACK_BEHAVIOR(callback_2);
// FileSystem should not allow multiple opens.
ASSERT_NE(PP_OK, callback_2.result());
@@ -61,7 +61,7 @@ std::string TestFileSystem::TestMultipleOpens() {
ASSERT_EQ(PP_OK, callback_1.result());
TestCompletionCallback callback_3(instance_->pp_instance(), force_async_);
- callback_3.WaitForResult(file_system.Open(1024, callback_3));
+ callback_3.WaitForResult(file_system.Open(1024, callback_3.GetCallback()));
CHECK_CALLBACK_BEHAVIOR(callback_3);
ASSERT_NE(PP_OK, callback_3.result());