summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authormseaborn <mseaborn@chromium.org>2016-03-13 16:44:24 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-13 23:45:51 +0000
commit5992ebf47d431338cd0b460e18c61064462ad14e (patch)
treed4db68e4ae541fb1c75126167e1166172dd5463d /ppapi
parenta5986b92db12254853b8e9a7098a01b4db532ab6 (diff)
downloadchromium_src-5992ebf47d431338cd0b460e18c61064462ad14e.zip
chromium_src-5992ebf47d431338cd0b460e18c61064462ad14e.tar.gz
chromium_src-5992ebf47d431338cd0b460e18c61064462ad14e.tar.bz2
NaCl cleanup: Remove the disabled Scons-based "browser_dynamic_library" test
This test is disabled when env.Bit('nacl_static_link') is set, but this is always set because chrome/test/nacl_test_injection/buildbot_nacl_integration.py uses "--disable_glibc". These days this functionality should effectively be tested by chrome/test/data/nacl/manifest_file/irt_manifest_file_test.cc. That doesn't do dlopen() end-to-end, but it does test open_resource(). BUG=154400 TEST=trybots Review URL: https://codereview.chromium.org/1779073002 Cr-Commit-Position: refs/heads/master@{#380912}
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/native_client/chrome_main.scons1
-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
5 files changed, 0 insertions, 162 deletions
diff --git a/ppapi/native_client/chrome_main.scons b/ppapi/native_client/chrome_main.scons
index b6154c6..cd35319 100644
--- a/ppapi/native_client/chrome_main.scons
+++ b/ppapi/native_client/chrome_main.scons
@@ -36,7 +36,6 @@ ppapi_scons_files['untrusted_irt_scons_files'] = []
ppapi_scons_files['nonvariant_test_scons_files'] = [
'tests/breakpad_crash_test/nacl.scons',
- 'tests/nacl_browser/browser_dynamic_library/nacl.scons',
'tests/ppapi_test_lib/nacl.scons',
]
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())