summaryrefslogtreecommitdiffstats
path: root/ppapi/native_client/tests/nacl_browser
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/native_client/tests/nacl_browser')
-rw-r--r--ppapi/native_client/tests/nacl_browser/browser_dynamic_library/browser_dlopen_test.cc60
-rw-r--r--ppapi/native_client/tests/nacl_browser/browser_dynamic_library/browser_dlopen_test.html42
-rw-r--r--ppapi/native_client/tests/nacl_browser/browser_dynamic_library/browser_dlopen_test.nmf14
-rw-r--r--ppapi/native_client/tests/nacl_browser/browser_dynamic_library/nacl.scons45
4 files changed, 0 insertions, 161 deletions
diff --git a/ppapi/native_client/tests/nacl_browser/browser_dynamic_library/browser_dlopen_test.cc b/ppapi/native_client/tests/nacl_browser/browser_dynamic_library/browser_dlopen_test.cc
deleted file mode 100644
index 9c64e21..0000000
--- a/ppapi/native_client/tests/nacl_browser/browser_dynamic_library/browser_dlopen_test.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2012 The Chromium Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <dlfcn.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/native_client/tests/ppapi_test_lib/get_browser_interface.h"
-#include "ppapi/native_client/tests/ppapi_test_lib/test_interface.h"
-#include "ppapi/native_client/tests/ppapi_test_lib/testable_callback.h"
-
-
-namespace {
-
-void TestDlopenMainThread() {
- // This is a valid .so to load up, but dlopen doesn't work from the main
- // PPAPI thread, so it should always fail.
- void* lib_handle = dlopen("libmemusage.so", RTLD_LAZY);
- EXPECT(lib_handle == NULL);
- TEST_PASSED;
-}
-
-
-void CheckSecondaryThreadSuccess(void *lib_handle, int32_t unused_result) {
- EXPECT(lib_handle != NULL);
- PostTestMessage("TestDlopenSecondaryThread", "PASSED");
-}
-
-void* SecondaryThreadFunc(void *unused_data) {
- void* lib_handle = dlopen("libmemusage.so", RTLD_LAZY);
- PP_CompletionCallback callback = PP_MakeCompletionCallback(
- CheckSecondaryThreadSuccess,
- lib_handle);
- PPBCore()->CallOnMainThread(0, callback, PP_OK);
- return NULL;
-}
-
-void TestDlopenSecondaryThread() {
- pthread_t p;
- pthread_create(&p, NULL, SecondaryThreadFunc, NULL);
- // This function must return in order for the main message loop to
- // service the requests issued from the dlopen call, we can't wait
- // for the result of the thread here. The 'PASSED' message will
- // be generated by the thread.
-}
-}
-
-void SetupTests() {
- RegisterTest("TestDlopenMainThread", TestDlopenMainThread);
- RegisterTest("TestDlopenSecondaryThread", TestDlopenSecondaryThread);
-}
-
-void SetupPluginInterfaces() {
- // none
-}
diff --git a/ppapi/native_client/tests/nacl_browser/browser_dynamic_library/browser_dlopen_test.html b/ppapi/native_client/tests/nacl_browser/browser_dynamic_library/browser_dlopen_test.html
deleted file mode 100644
index 0df3ea9..0000000
--- a/ppapi/native_client/tests/nacl_browser/browser_dynamic_library/browser_dlopen_test.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<!--
- Copyright 2012 The Chromium Authors. All rights reserved.
- Use of this source code is governed by a BSD-style license that can
- be found in the LICENSE file.
--->
-<head>
- <title>PPAPI Runtime Feature Test</title>
- <meta HTTP-EQUIV="Pragma" CONTENT="no-cache" />
- <meta HTTP-EQUIV="Expires" CONTENT="-1" />
- <script type="text/javascript" src="nacltest.js"></script>
-</head>
-
-<body id="body">
-<embed id="naclDSOModule"
- name="naclDSOModule"
- src="browser_dlopen_test.nmf"
- type="application/x-nacl"
- width=0 height=0 />
-<script type="text/javascript">
-function setupTests(tester, plugin) {
- function addTest(test_name) {
- tester.addAsyncTest(test_name, function(test) {
- test.expectMessageSequence(plugin, [test_name + ':PASSED']);
- plugin.postMessage(test_name);
- });
- }
-
- addTest("TestDlopenMainThread");
- addTest("TestDlopenSecondaryThread");
-}
-//<![CDATA[
-var tester = new Tester();
- setupTests(tester, $('naclDSOModule'));
- tester.waitFor($('naclDSOModule'));
- tester.run();
-//]]>
-</script>
-</body>
-</html>
diff --git a/ppapi/native_client/tests/nacl_browser/browser_dynamic_library/browser_dlopen_test.nmf b/ppapi/native_client/tests/nacl_browser/browser_dynamic_library/browser_dlopen_test.nmf
deleted file mode 100644
index 6a2602c..0000000
--- a/ppapi/native_client/tests/nacl_browser/browser_dynamic_library/browser_dlopen_test.nmf
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "program": {
- "x86-32" : {"url" : "browser_dlopen_test_x86-32.nexe"},
- "x86-64" : {"url" : "browser_dlopen_test_x86-64.nexe"},
- "arm" : {"url" : "browser_dlopen_test_arm.nexe"}
- },
- "files": {
- "libmemusage.so" : {
- "x86-32" : {"url" : "libmemusage.so"},
- "x86-64" : {"url" : "libmemusage.so"},
- "arm" : {"url" : "libmemusage.so"}
- }
- }
-}
diff --git a/ppapi/native_client/tests/nacl_browser/browser_dynamic_library/nacl.scons b/ppapi/native_client/tests/nacl_browser/browser_dynamic_library/nacl.scons
deleted file mode 100644
index aac7fed..0000000
--- a/ppapi/native_client/tests/nacl_browser/browser_dynamic_library/nacl.scons
+++ /dev/null
@@ -1,45 +0,0 @@
-# -*- python -*-
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-
-Import('env')
-
-if env.Bit('nacl_static_link'):
- Return()
-
-toolchain_libraries = [
- 'libmemusage.so', # Will dlopen this library.
- ]
-
-def make_mappings(libdir, libs):
- return [(lib, env.File(os.path.join(libdir, lib))) for lib in libs]
-
-# Allow resolving a URL to the toolchain/ directory (instead of staging).
-browser_dlopen_file_mapping = make_mappings('${NACL_SDK_LIB}',
- toolchain_libraries)
-
-browser_dlopen_nexe_name = env.ProgramNameForNmf('browser_dlopen_test')
-browser_dlopen_nexe = env.ComponentProgram(browser_dlopen_nexe_name,
- 'browser_dlopen_test.cc',
- EXTRA_LIBS=[
- 'ppapi',
- 'ppapi_test_lib',
- 'platform',
- 'dl',
- '${PTHREAD_LIBS}'])
-
-
-env.Publish(browser_dlopen_nexe_name, 'run', ['browser_dlopen_test.html'])
-
-browser_dlopen_node = env.PPAPIBrowserTester(
- 'browser_dlopen_test.out', url='browser_dlopen_test.html',
- files=env.ExtractPublishedFiles(browser_dlopen_nexe_name),
- nmfs=['browser_dlopen_test.nmf'],
- map_files=browser_dlopen_file_mapping)
-
-env.AddNodeToTestSuite(browser_dlopen_node, ['chrome_browser_tests'],
- 'run_browser_dlopen_test',
- is_broken=env.PPAPIBrowserTesterIsBroken())