| Index: ppapi/tests/test_case.h
|
| ===================================================================
|
| --- ppapi/tests/test_case.h (revision 90603)
|
| +++ ppapi/tests/test_case.h (working copy)
|
| @@ -69,6 +69,9 @@
|
| // NULL unless InitTestingInterface is called.
|
| const PPB_Testing_Dev* testing_interface_;
|
|
|
| + // Force asynchronous completion of any operation taking a callback.
|
| + bool force_async_;
|
| +
|
| private:
|
| // Holds the test object, if any was retrieved from CreateTestObject.
|
| pp::Var test_object_;
|
| @@ -114,10 +117,19 @@
|
|
|
| // Helper macro for calling functions implementing specific tests in the
|
| // RunTest function. This assumes the function name is TestFoo where Foo is the
|
| -// test name,
|
| +// test |name|.
|
| #define RUN_TEST(name) \
|
| + force_async_ = false; \
|
| instance_->LogTest(#name, Test##name());
|
|
|
| +// Helper macro for repeating the same test involving callbacks with and
|
| +// without force_async option.
|
| +#define RUN_ASYNC_TEST(name) \
|
| + force_async_ = false; \
|
| + instance_->LogTest(#name, Test##name()); \
|
| + force_async_ = true; \
|
| + instance_->LogTest(#name"ForceAsync", Test##name());
|
| +
|
| // Helper macros for checking values in tests, and returning a location
|
| // description of the test fails.
|
| #define ASSERT_TRUE(cmd) \
|
|
|