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 <sstream> | 10 #include <sstream> |
10 | 11 |
11 #include "ppapi/cpp/core.h" | 12 #include "ppapi/cpp/core.h" |
12 #include "ppapi/cpp/module.h" | 13 #include "ppapi/cpp/module.h" |
13 #include "ppapi/tests/pp_thread.h" | 14 #include "ppapi/tests/pp_thread.h" |
14 #include "ppapi/tests/test_utils.h" | 15 #include "ppapi/tests/test_utils.h" |
15 #include "ppapi/tests/testing_instance.h" | 16 #include "ppapi/tests/testing_instance.h" |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 void TestCase::RunOnThreadInternal(void (*thread_func)(void*), | 257 void TestCase::RunOnThreadInternal(void (*thread_func)(void*), |
257 void* thread_param, | 258 void* thread_param, |
258 const PPB_Testing_Dev* testing_interface) { | 259 const PPB_Testing_Dev* testing_interface) { |
259 PP_ThreadType thread; | 260 PP_ThreadType thread; |
260 PP_CreateThread(&thread, thread_func, thread_param); | 261 PP_CreateThread(&thread, thread_func, thread_param); |
261 // Run a message loop so pepper calls can be dispatched. The background | 262 // Run a message loop so pepper calls can be dispatched. The background |
262 // thread will set result_ and make us Quit when it's done. | 263 // thread will set result_ and make us Quit when it's done. |
263 testing_interface->RunMessageLoop(instance_->pp_instance()); | 264 testing_interface->RunMessageLoop(instance_->pp_instance()); |
264 PP_JoinThread(thread); | 265 PP_JoinThread(thread); |
265 } | 266 } |
OLD | NEW |