diff options
author | ncbray@chromium.org <ncbray@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-16 03:35:53 +0000 |
---|---|---|
committer | ncbray@chromium.org <ncbray@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-16 03:35:53 +0000 |
commit | 61e36db9e290ddf09d6358f70928ac548d4e1cde (patch) | |
tree | 1a3b7220e77a72b5bfd22b933e0fa57c6a064988 /ppapi | |
parent | 849f02ba7aa958bf612e6bae2bc5e31b3081e9aa (diff) | |
download | chromium_src-61e36db9e290ddf09d6358f70928ac548d4e1cde.zip chromium_src-61e36db9e290ddf09d6358f70928ac548d4e1cde.tar.gz chromium_src-61e36db9e290ddf09d6358f70928ac548d4e1cde.tar.bz2 |
Rewrite nacl_integration test for relative manifest loading as browser_test.
BUG=154400
Review URL: https://codereview.chromium.org/134463008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
8 files changed, 0 insertions, 240 deletions
diff --git a/ppapi/native_client/chrome_main.scons b/ppapi/native_client/chrome_main.scons index a8e7bec..3c4168c 100644 --- a/ppapi/native_client/chrome_main.scons +++ b/ppapi/native_client/chrome_main.scons @@ -37,7 +37,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_browser/manifest/nacl.scons', 'tests/ppapi_test_lib/nacl.scons', ] diff --git a/ppapi/native_client/tests/ppapi_browser/manifest/manifest.html b/ppapi/native_client/tests/ppapi_browser/manifest/manifest.html deleted file mode 100644 index bab4000..0000000 --- a/ppapi/native_client/tests/ppapi_browser/manifest/manifest.html +++ /dev/null @@ -1,89 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html> -<!-- Copyright (c) 2011 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> - <script type="text/javascript" src="progress_event_listener.js"></script> -</head> - -<body id="body"> -<script type="text/javascript"> -//<![CDATA[ -var tester = new Tester($('body')); -testProgressEventStateMachine( - tester, - 'topdir_static', - 2, // progressMinCount - 0, // errorCount - 0, // abortCount - 1, // loadCount - undefined // lastError -); -testProgressEventStateMachine( - tester, - 'subdir_static', - 2, // progressMinCount - 0, // errorCount - 0, // abortCount - 1, // loadCount - undefined // lastError -); -testProgressEventStateMachine( - tester, - 'arch_specific_files', - 2, // progressMinCount - 0, // errorCount - 0, // abortCount - 1, // loadCount - undefined // lastError -); -function runTests() { - tester.waitFor($('topdir_static'), $('subdir_static')); - tester.run(); -} -// Set all the listeners on the body. -setListeners($('body')); -//]]> -</script> - -<!-- -// manifest_top refers to nexes in a subdirectory below the manifest. ---> -<embed id="topdir_static" - class="naclModule" - width=0 height=0 - src="manifest_top.nmf" - type="application/x-nacl" /> - -<!-- -// manifest_subdir refers to resources in the same directory as the manifest. ---> -<embed id="subdir_static" - class="naclModule" - width=0 height=0 - src="subdir/manifest_subdir.nmf" - type="application/x-nacl" /> - -<!-- -// manifest_arch_specific refers to unused files that are not available on all -// platforms. ---> -<embed id="arch_specific_files" - class="naclModule" - width=0 height=0 - src="manifest_arch_specific.nmf" - type="application/x-nacl" /> - -<script type="text/javascript"> -//<![CDATA[ -runTests(); -//]]> -</script> -</body> -</html> diff --git a/ppapi/native_client/tests/ppapi_browser/manifest/manifest_arch_specific.nmf b/ppapi/native_client/tests/ppapi_browser/manifest/manifest_arch_specific.nmf deleted file mode 100644 index e32ba3b..0000000 --- a/ppapi/native_client/tests/ppapi_browser/manifest/manifest_arch_specific.nmf +++ /dev/null @@ -1,15 +0,0 @@ -{ - "program": { - "x86-32": {"url": "subdir/manifest_good_x86-32.nexe"}, - "x86-64": {"url": "subdir/manifest_good_x86-64.nexe"}, - "arm": {"url": "subdir/manifest_good_arm.nexe"} - }, - "files": { - "x86-32-specific": { - "x86-32": {"url": "subdir/manifest_good_x86-32.nexe"} - }, - "x86-64-specific": { - "x86-64": {"url": "subdir/manifest_good_x86-64.nexe"} - } - } -} diff --git a/ppapi/native_client/tests/ppapi_browser/manifest/manifest_bad.cc b/ppapi/native_client/tests/ppapi_browser/manifest/manifest_bad.cc deleted file mode 100644 index 4618272..0000000 --- a/ppapi/native_client/tests/ppapi_browser/manifest/manifest_bad.cc +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2011 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 <cstdio> -#include <cstdlib> -#include <cstring> - -#include "native_client/src/shared/platform/nacl_check.h" -#include "ppapi/c/pp_errors.h" -#include "ppapi/c/pp_module.h" -#include "ppapi/c/ppb.h" -#include "ppapi/c/ppp_instance.h" - -#include "ppapi/c/ppp.h" - -int32_t PPP_InitializeModule(PP_Module module_id, - PPB_GetInterface get_browser_interface) { - printf("PPP_InitializeModule\n"); - - // Request an unsupported interface. - CHECK(NULL == get_browser_interface("UnimplementedInterface;1.0")); - // Request a supported interface with a bad revision number. - CHECK(NULL == get_browser_interface("PPB_Instance;0.0")); - - return PP_OK; -} - -PP_EXPORT void PPP_ShutdownModule() { - printf("PPP_ShutdownModule\n"); - fflush(stdout); -} - -PP_EXPORT const void* PPP_GetInterface(const char* interface_name) { - printf("PPP_GetInterface(%s)\n", interface_name); - if (0 == std::strcmp(interface_name, PPP_INSTANCE_INTERFACE)) // Required. - return NULL; - return NULL; -} diff --git a/ppapi/native_client/tests/ppapi_browser/manifest/manifest_good.cc b/ppapi/native_client/tests/ppapi_browser/manifest/manifest_good.cc deleted file mode 100644 index ac0fabf..0000000 --- a/ppapi/native_client/tests/ppapi_browser/manifest/manifest_good.cc +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2011 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 "ppapi/native_client/tests/ppapi_test_lib/test_interface.h" - -void SetupTests() { - // none -} - -void SetupPluginInterfaces() { - // none -} diff --git a/ppapi/native_client/tests/ppapi_browser/manifest/manifest_subdir.nmf b/ppapi/native_client/tests/ppapi_browser/manifest/manifest_subdir.nmf deleted file mode 100644 index 65fd88d..0000000 --- a/ppapi/native_client/tests/ppapi_browser/manifest/manifest_subdir.nmf +++ /dev/null @@ -1,7 +0,0 @@ -{ - "program": { - "x86-32": {"url": "manifest_good_x86-32.nexe"}, - "x86-64": {"url": "manifest_good_x86-64.nexe"}, - "arm": {"url": "manifest_good_arm.nexe"} - } -} diff --git a/ppapi/native_client/tests/ppapi_browser/manifest/manifest_top.nmf b/ppapi/native_client/tests/ppapi_browser/manifest/manifest_top.nmf deleted file mode 100644 index dcbf573..0000000 --- a/ppapi/native_client/tests/ppapi_browser/manifest/manifest_top.nmf +++ /dev/null @@ -1,7 +0,0 @@ -{ - "program": { - "x86-32": {"url": "subdir/manifest_good_x86-32.nexe"}, - "x86-64": {"url": "subdir/manifest_good_x86-64.nexe"}, - "arm": {"url": "subdir/manifest_good_arm.nexe"} - } -} diff --git a/ppapi/native_client/tests/ppapi_browser/manifest/nacl.scons b/ppapi/native_client/tests/ppapi_browser/manifest/nacl.scons deleted file mode 100644 index 9e93beb..0000000 --- a/ppapi/native_client/tests/ppapi_browser/manifest/nacl.scons +++ /dev/null @@ -1,69 +0,0 @@ -# -*- python -*- -# Copyright (c) 2012 The Native Client 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('env') - -# TODO(robertm): those should not be necessary once we go -std=c99 -env.FilterOut(CFLAGS=['-pedantic']) -env.FilterOut(CCFLAGS=['-pedantic']) -env.Replace(TEST_DIR='${SOURCE_ROOT}/ppapi/native_client/tests/ppapi_browser/' + - 'manifest') - -manifest_good_sources = env.ComponentObject('manifest_good.cc'), - -manifest_good_target = env.ProgramNameForNmf('manifest_good') -env.ComponentProgram(manifest_good_target, - [manifest_good_sources], - EXTRA_LIBS=['ppapi', - 'ppapi_test_lib', - 'pthread', - 'platform', - 'gio']) - -manifest_bad_sources = env.ComponentObject('manifest_bad.cc'), - -manifest_bad_target = env.ProgramNameForNmf('manifest_bad') -env.ComponentProgram(manifest_bad_target, - [manifest_bad_sources], - EXTRA_LIBS=['ppapi', - 'ppapi_test_lib', - 'pthread', - 'platform', - 'gio']) - -env.Publish(manifest_good_target, 'run', [ - 'manifest.html', - manifest_bad_target, - '${SCONSTRUCT_DIR}/tests/ppapi_browser/progress_event_listener.js', - '${SCONSTRUCT_DIR}/tools/browser_tester/browserdata/nacltest.js', -]) - -file_mapping = [] -if env.Bit('nacl_glibc'): - file_mapping.append( - ('subdir/runnable-ld.so',env.File('${NACL_SDK_LIB}/runnable-ld.so'))) -file_mapping += [ - ('subdir/manifest_subdir.nmf', - env.File('${STAGING_DIR}/manifest_subdir.nmf')), - # the 'good' nexe in the root directory will fail. - (manifest_good_target + env['PROGSUFFIX'], - env.File('${STAGING_DIR}/%s${PROGSUFFIX}' % manifest_bad_target)), - # the 'good' nexe in the subdirectory will succeed. - ('subdir/' + manifest_good_target + env['PROGSUFFIX'], - env.File('${STAGING_DIR}/%s${PROGSUFFIX}' % manifest_good_target))] - -node = env.PPAPIBrowserTester( - 'manifest_browser_test.out', - url='manifest.html', - nmfs=['${TEST_DIR}/manifest_top.nmf', - '${TEST_DIR}/manifest_subdir.nmf', - '${TEST_DIR}/manifest_arch_specific.nmf'], - files=env.ExtractPublishedFiles(manifest_good_target), - map_files=file_mapping) - -env.AddNodeToTestSuite(node, - ['chrome_browser_tests'], - 'run_manifest_browser_test', - is_broken=env.PPAPIBrowserTesterIsBroken()) |