OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "native_client/src/shared/platform/nacl_check.h" |
| 6 #include "ppapi/c/pp_errors.h" |
| 7 #include "ppapi/c/ppb_core.h" |
| 8 #include "native_client/tests/ppapi_test_lib/get_browser_interface.h" |
| 9 #include "native_client/tests/ppapi_test_lib/test_interface.h" |
| 10 |
| 11 |
| 12 namespace { |
| 13 |
| 14 void CrashingCallback(void* /*user_data*/, int32_t /*result*/) { |
| 15 printf("--- CrashingCallback\n"); |
| 16 CRASH; |
| 17 } |
| 18 |
| 19 void CrashInCallback() { |
| 20 printf("--- CrashInCallback\n"); |
| 21 PP_CompletionCallback callback = |
| 22 PP_MakeCompletionCallback(CrashingCallback, NULL); |
| 23 PPBCore()->CallOnMainThread(0 /*delay*/, callback, PP_OK); |
| 24 } |
| 25 |
| 26 } // namespace |
| 27 |
| 28 void SetupTests() { |
| 29 RegisterTest("CrashInCallback", CrashInCallback); |
| 30 } |
| 31 |
| 32 void SetupPluginInterfaces() { |
| 33 // none |
| 34 } |
OLD | NEW |