This source file includes following definitions.
- CrashOffMainThreadFunction
- CrashOffMainThread
- Ping
- SetupTests
- SetupPluginInterfaces
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include "native_client/src/shared/platform/nacl_check.h"
#include "ppapi/native_client/tests/ppapi_test_lib/test_interface.h"
namespace {
void* CrashOffMainThreadFunction(void* thread_arg) {
printf("--- CrashOffMainThreadFunction\n");
usleep(1000);
CRASH;
return NULL;
}
void CrashOffMainThread() {
printf("--- CrashOffMainThread\n");
pthread_t tid;
pthread_create(&tid, NULL , CrashOffMainThreadFunction, NULL);
pthread_detach(tid);
}
void Ping() {
LOG_TO_BROWSER("ping received");
}
}
void SetupTests() {
RegisterTest("CrashOffMainThread", CrashOffMainThread);
RegisterTest("Ping", Ping);
}
void SetupPluginInterfaces() {
}