OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ppapi/tests/test_case.h" | 5 #include "ppapi/tests/test_case.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 void TestCase::DoQuitMainMessageLoop(void* pp_instance, int32_t result) { | 244 void TestCase::DoQuitMainMessageLoop(void* pp_instance, int32_t result) { |
245 PP_Instance* instance = static_cast<PP_Instance*>(pp_instance); | 245 PP_Instance* instance = static_cast<PP_Instance*>(pp_instance); |
246 GetTestingInterface()->QuitMessageLoop(*instance); | 246 GetTestingInterface()->QuitMessageLoop(*instance); |
247 delete instance; | 247 delete instance; |
248 } | 248 } |
249 | 249 |
250 void TestCase::RunOnThreadInternal( | 250 void TestCase::RunOnThreadInternal( |
251 void (*thread_func)(void*), | 251 void (*thread_func)(void*), |
252 void* thread_param, | 252 void* thread_param, |
253 const PPB_Testing_Private* testing_interface) { | 253 const PPB_Testing_Private* testing_interface) { |
254 PP_ThreadType thread; | 254 PP_Thread thread; |
255 PP_CreateThread(&thread, thread_func, thread_param); | 255 PP_CreateThread(&thread, thread_func, thread_param); |
256 // Run a message loop so pepper calls can be dispatched. The background | 256 // Run a message loop so pepper calls can be dispatched. The background |
257 // thread will set result_ and make us Quit when it's done. | 257 // thread will set result_ and make us Quit when it's done. |
258 testing_interface->RunMessageLoop(instance_->pp_instance()); | 258 testing_interface->RunMessageLoop(instance_->pp_instance()); |
259 PP_JoinThread(thread); | 259 PP_JoinThread(thread); |
260 } | 260 } |
OLD | NEW |