| Index: ppapi/tests/test_case.cc
|
| diff --git a/ppapi/tests/test_case.cc b/ppapi/tests/test_case.cc
|
| index 26f6d40ba5235ec7829e3129b03e913b8d97c404..cc0ba486521c7fc9034bbe81ab792af3b8db9285 100644
|
| --- a/ppapi/tests/test_case.cc
|
| +++ b/ppapi/tests/test_case.cc
|
| @@ -107,8 +107,10 @@ bool TestCase::MatchesFilter(const std::string& test_name,
|
| return filter.empty() || (test_name == filter);
|
| }
|
|
|
| -std::string TestCase::CheckResourcesAndVars() {
|
| - std::string errors;
|
| +std::string TestCase::CheckResourcesAndVars(std::string errors) {
|
| + if (!errors.empty())
|
| + return errors;
|
| +
|
| if (testing_interface_) {
|
| // TODO(dmichael): Fix tests that leak resources and enable the following:
|
| /*
|
| @@ -143,4 +145,17 @@ std::string TestCase::CheckResourcesAndVars() {
|
| return errors;
|
| }
|
|
|
| +// static
|
| +void TestCase::QuitMainMessageLoop(PP_Instance instance) {
|
| + PP_Instance* heap_instance = new PP_Instance(instance);
|
| + pp::CompletionCallback callback(&DoQuitMainMessageLoop, heap_instance);
|
| + pp::Module::Get()->core()->CallOnMainThread(0, callback);
|
| +}
|
| +
|
| +// static
|
| +void TestCase::DoQuitMainMessageLoop(void* pp_instance, int32_t result) {
|
| + PP_Instance* instance = static_cast<PP_Instance*>(pp_instance);
|
| + GetTestingInterface()->QuitMessageLoop(*instance);
|
| + delete instance;
|
| +}
|
|
|
|
|