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

Unified Diff: ppapi/tests/test_file_system.cc

Issue 14139012: PPAPI: More test cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Provide a message loop for "background thread" test so we can use a REQUIRED callback Created 7 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 | « ppapi/tests/test_case.h ('k') | ppapi/tests/test_graphics_2d.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_file_system.cc
diff --git a/ppapi/tests/test_file_system.cc b/ppapi/tests/test_file_system.cc
index 9601f54589e85191242a2da90119f750fb975a8d..9a2d71244ab240e6278e1e24637e0753e9422c56 100644
--- a/ppapi/tests/test_file_system.cc
+++ b/ppapi/tests/test_file_system.cc
@@ -18,12 +18,12 @@ bool TestFileSystem::Init() {
}
void TestFileSystem::RunTests(const std::string& filter) {
- RUN_TEST_FORCEASYNC_AND_NOT(Open, filter);
- RUN_TEST_FORCEASYNC_AND_NOT(MultipleOpens, filter);
+ RUN_CALLBACK_TEST(TestFileSystem, Open, filter);
+ RUN_CALLBACK_TEST(TestFileSystem, MultipleOpens, filter);
}
std::string TestFileSystem::TestOpen() {
- TestCompletionCallback callback(instance_->pp_instance(), force_async_);
+ TestCompletionCallback callback(instance_->pp_instance(), callback_type());
// Open.
pp::FileSystem file_system(instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY);
@@ -46,11 +46,11 @@ std::string TestFileSystem::TestOpen() {
std::string TestFileSystem::TestMultipleOpens() {
// Should not allow multiple opens, regardless of whether or not the first
// open has completed.
- TestCompletionCallback callback_1(instance_->pp_instance(), force_async_);
+ TestCompletionCallback callback_1(instance_->pp_instance(), callback_type());
pp::FileSystem file_system(instance_, PP_FILESYSTEMTYPE_LOCALTEMPORARY);
int32_t rv_1 = file_system.Open(1024, callback_1.GetCallback());
- TestCompletionCallback callback_2(instance_->pp_instance(), force_async_);
+ TestCompletionCallback callback_2(instance_->pp_instance(), callback_type());
callback_2.WaitForResult(file_system.Open(1024, callback_2.GetCallback()));
CHECK_CALLBACK_BEHAVIOR(callback_2);
// FileSystem should not allow multiple opens.
@@ -60,7 +60,7 @@ std::string TestFileSystem::TestMultipleOpens() {
CHECK_CALLBACK_BEHAVIOR(callback_1);
ASSERT_EQ(PP_OK, callback_1.result());
- TestCompletionCallback callback_3(instance_->pp_instance(), force_async_);
+ TestCompletionCallback callback_3(instance_->pp_instance(), callback_type());
callback_3.WaitForResult(file_system.Open(1024, callback_3.GetCallback()));
CHECK_CALLBACK_BEHAVIOR(callback_3);
ASSERT_NE(PP_OK, callback_3.result());
« no previous file with comments | « ppapi/tests/test_case.h ('k') | ppapi/tests/test_graphics_2d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698