Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / test / data / nacl / crash / ppapi_crash_in_callback.cc
blobb4d383b5a63de70298a8dc1df405fc5b5d5d8a97
1 // Copyright 2013 The Chromium 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.
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 "ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h"
9 #include "ppapi/native_client/tests/ppapi_test_lib/test_interface.h"
12 namespace {
14 void CrashingCallback(void* /*user_data*/, int32_t /*result*/) {
15 printf("--- CrashingCallback\n");
16 CRASH;
19 void CrashInCallback() {
20 printf("--- CrashInCallback\n");
21 PP_CompletionCallback callback =
22 PP_MakeCompletionCallback(CrashingCallback, NULL);
23 PPBCore()->CallOnMainThread(0 /*delay*/, callback, PP_OK);
26 } // namespace
28 void SetupTests() {
29 RegisterTest("CrashInCallback", CrashInCallback);
32 void SetupPluginInterfaces() {
33 // none