summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorksakamoto@chromium.org <ksakamoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 01:33:54 +0000
committerksakamoto@chromium.org <ksakamoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-18 01:33:54 +0000
commit45c71343a3e6b19d3b86319f3b52c3d9e239b298 (patch)
tree6e604efeaf323b09c9594396ddb7f2619fa69f09
parent8fc674ea11b1c4d9662845d6d86ad53c2bbc773e (diff)
downloadchromium_src-45c71343a3e6b19d3b86319f3b52c3d9e239b298.zip
chromium_src-45c71343a3e6b19d3b86319f3b52c3d9e239b298.tar.gz
chromium_src-45c71343a3e6b19d3b86319f3b52c3d9e239b298.tar.bz2
Revert 241424 "Port ppapi_bad test from nacl_integration to brow..."
Broke cros_daisy Build. http://build.chromium.org/p/tryserver.chromium/builders/cros_daisy/builds/3191 > Port ppapi_bad test from nacl_integration to browser_tests. > > PNaCl is not supported because crash throttling interferes with the test. > CORS tests were removed because they were redunant with existing tests and would > have been difficult to port because of how browser_test's http server behaves. > The dynamic loading test was removed because it required a golden file and would > likely never work as a browser_test. > > BUG=154400 > > Review URL: https://codereview.chromium.org/116843002 TBR=ncbray@chromium.org Review URL: https://codereview.chromium.org/109283007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241441 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/test/data/nacl/nacl_test_data.gyp178
-rw-r--r--chrome/test/nacl/nacl_browsertest.cc16
-rw-r--r--ppapi/native_client/chrome_main.scons1
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/nacl.scons131
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/partly_invalid.nmf (renamed from chrome/test/data/nacl/bad/partly_invalid.nmf)0
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.html (renamed from chrome/test/data/nacl/bad/ppapi_bad.html)29
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.js (renamed from chrome/test/data/nacl/bad/ppapi_bad.js)2
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_crossorigin.nmf7
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_doesnotexist.nmf (renamed from chrome/test/data/nacl/bad/ppapi_bad_doesnotexist.nmf)0
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_event_replay_crash.cc (renamed from chrome/test/data/nacl/bad/ppapi_bad_event_replay_crash.cc)2
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_get_ppp_instance_crash.cc (renamed from chrome/test/data/nacl/bad/ppapi_bad_get_ppp_instance_crash.cc)2
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_get_ppp_messaging_crash.cc (renamed from chrome/test/data/nacl/bad/ppapi_bad_get_ppp_messaging_crash.cc)2
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_get_ppp_printing_crash.cc (renamed from chrome/test/data/nacl/bad/ppapi_bad_get_ppp_printing_crash.cc)2
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_magic.nmf (renamed from chrome/test/data/nacl/bad/ppapi_bad_magic.nmf)0
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_manifest_bad_files.nmf (renamed from chrome/test/data/nacl/bad/ppapi_bad_manifest_bad_files.nmf)0
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_manifest_nexe_arch.nmf (renamed from chrome/test/data/nacl/bad/ppapi_bad_manifest_nexe_arch.nmf)0
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_manifest_uses_nexes.nmf (renamed from chrome/test/data/nacl/bad/ppapi_bad_manifest_uses_nexes.nmf)0
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_native.html (renamed from chrome/test/data/nacl/bad/ppapi_bad_native.html)0
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_native_glibc.html37
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_native_glibc.stderr1
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_no_ppp_instance.cc (renamed from chrome/test/data/nacl/bad/ppapi_bad_no_ppp_instance.cc)2
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_ppp_initialize.cc (renamed from chrome/test/data/nacl/bad/ppapi_bad_ppp_initialize.cc)2
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_ppp_initialize_crash.cc (renamed from chrome/test/data/nacl/bad/ppapi_bad_ppp_initialize_crash.cc)2
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_ppp_instance_didcreate.cc (renamed from chrome/test/data/nacl/bad/ppapi_bad_ppp_instance_didcreate.cc)2
-rw-r--r--ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_ppp_instance_didcreate_crash.cc (renamed from chrome/test/data/nacl/bad/ppapi_bad_ppp_instance_didcreate_crash.cc)2
25 files changed, 209 insertions, 211 deletions
diff --git a/chrome/test/data/nacl/nacl_test_data.gyp b/chrome/test/data/nacl/nacl_test_data.gyp
index 63f6ab8..6944b0b 100644
--- a/chrome/test/data/nacl/nacl_test_data.gyp
+++ b/chrome/test/data/nacl/nacl_test_data.gyp
@@ -19,16 +19,9 @@
# TODO(ncbray) move into chrome/test/data/nacl when all tests are
# converted.
'<(DEPTH)/ppapi/native_client/tests/ppapi_browser/progress_event_listener.js',
+ '<(DEPTH)/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.js',
'<(DEPTH)/ppapi/native_client/tools/browser_tester/browserdata/nacltest.js',
# Files that aren't assosiated with any particular executable.
- 'bad/ppapi_bad.html',
- 'bad/ppapi_bad.js',
- 'bad/ppapi_bad_native.html',
- 'bad/ppapi_bad_doesnotexist.nmf',
- 'bad/ppapi_bad_magic.nmf',
- 'bad/ppapi_bad_manifest_uses_nexes.nmf',
- 'bad/ppapi_bad_manifest_bad_files.nmf',
- 'bad/ppapi_bad_manifest_nexe_arch.nmf',
'crash/ppapi_crash.html',
],
},
@@ -139,175 +132,6 @@
],
},
{
- 'target_name': 'ppapi_bad_ppp_initialize',
- 'type': 'none',
- 'variables': {
- 'nexe_target': 'ppapi_bad_ppp_initialize',
- 'build_newlib': 1,
- 'build_glibc': 0,
- 'build_pnacl_newlib': 0,
- 'nexe_destination_dir': 'nacl_test_data',
- 'link_flags': [
- '-lppapi',
- '-lplatform',
- '-lgio',
- ],
- 'sources': [
- 'bad/ppapi_bad_ppp_initialize.cc',
- ],
- },
- 'dependencies': [
- '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
- '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform_lib',
- '<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio_lib',
- '<(DEPTH)/ppapi/native_client/native_client.gyp:ppapi_lib',
- ],
- },
- {
- 'target_name': 'ppapi_bad_ppp_initialize_crash',
- 'type': 'none',
- 'variables': {
- 'nexe_target': 'ppapi_bad_ppp_initialize_crash',
- 'build_newlib': 1,
- 'build_glibc': 0,
- 'build_pnacl_newlib': 0,
- 'nexe_destination_dir': 'nacl_test_data',
- 'link_flags': [
- '-lppapi',
- '-lplatform',
- '-lgio',
- ],
- 'sources': [
- 'bad/ppapi_bad_ppp_initialize_crash.cc',
- ],
- },
- 'dependencies': [
- '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
- '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform_lib',
- '<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio_lib',
- '<(DEPTH)/ppapi/native_client/native_client.gyp:ppapi_lib',
- ],
- },
- {
- 'target_name': 'ppapi_bad_no_ppp_instance',
- 'type': 'none',
- 'variables': {
- 'nexe_target': 'ppapi_bad_no_ppp_instance',
- 'build_newlib': 1,
- 'build_glibc': 0,
- 'build_pnacl_newlib': 0,
- 'nexe_destination_dir': 'nacl_test_data',
- 'link_flags': [
- '-lppapi',
- '-lplatform',
- '-lgio',
- ],
- 'sources': [
- 'bad/ppapi_bad_no_ppp_instance.cc',
- ],
- },
- 'dependencies': [
- '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
- '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform_lib',
- '<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio_lib',
- '<(DEPTH)/ppapi/native_client/native_client.gyp:ppapi_lib',
- ],
- },
- {
- 'target_name': 'ppapi_bad_get_ppp_instance_crash',
- 'type': 'none',
- 'variables': {
- 'nexe_target': 'ppapi_bad_get_ppp_instance_crash',
- 'build_newlib': 1,
- 'build_glibc': 0,
- 'build_pnacl_newlib': 0,
- 'nexe_destination_dir': 'nacl_test_data',
- 'link_flags': [
- '-lppapi',
- '-lplatform',
- '-lgio',
- ],
- 'sources': [
- 'bad/ppapi_bad_get_ppp_instance_crash.cc',
- ],
- },
- 'dependencies': [
- '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
- '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform_lib',
- '<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio_lib',
- '<(DEPTH)/ppapi/native_client/native_client.gyp:ppapi_lib',
- ],
- },
- {
- 'target_name': 'ppapi_bad_ppp_instance_didcreate',
- 'type': 'none',
- 'variables': {
- 'nexe_target': 'ppapi_bad_ppp_instance_didcreate',
- 'build_newlib': 1,
- 'build_glibc': 0,
- 'build_pnacl_newlib': 0,
- 'nexe_destination_dir': 'nacl_test_data',
- 'link_flags': [
- '-lppapi',
- '-lplatform',
- '-lgio',
- ],
- 'sources': [
- 'bad/ppapi_bad_ppp_instance_didcreate.cc',
- ],
- },
- 'dependencies': [
- '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
- '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform_lib',
- '<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio_lib',
- '<(DEPTH)/ppapi/native_client/native_client.gyp:ppapi_lib',
- ],
- },
- {
- 'target_name': 'ppapi_bad_ppp_instance_didcreate_crash',
- 'type': 'none',
- 'variables': {
- 'nexe_target': 'ppapi_bad_ppp_instance_didcreate_crash',
- 'build_newlib': 1,
- 'build_glibc': 0,
- 'build_pnacl_newlib': 0,
- 'nexe_destination_dir': 'nacl_test_data',
- 'link_flags': [
- '-lppapi',
- '-lplatform',
- '-lgio',
- ],
- 'sources': [
- 'bad/ppapi_bad_ppp_instance_didcreate_crash.cc',
- ],
- },
- 'dependencies': [
- '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
- '<(DEPTH)/native_client/src/shared/platform/platform.gyp:platform_lib',
- '<(DEPTH)/native_client/src/shared/gio/gio.gyp:gio_lib',
- '<(DEPTH)/ppapi/native_client/native_client.gyp:ppapi_lib',
- ],
- },
- {
- 'target_name': 'partly_invalid',
- 'type': 'none',
- 'variables': {
- 'nexe_target': 'partly_invalid',
- 'build_newlib': 1,
- 'build_glibc': 0,
- 'build_pnacl_newlib': 0,
- # Source file does not have asm for ARM.
- 'enable_arm': 0,
- 'nexe_destination_dir': 'nacl_test_data',
- 'sources': [
- '<(DEPTH)/native_client/tests/stubout_mode/partly_invalid.c',
- ],
- },
- 'dependencies': [
- '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
- ],
- },
- {
'target_name': 'ppapi_crash_via_check_failure',
'type': 'none',
'variables': {
diff --git a/chrome/test/nacl/nacl_browsertest.cc b/chrome/test/nacl/nacl_browsertest.cc
index 0146ef6..2efb8f8 100644
--- a/chrome/test/nacl/nacl_browsertest.cc
+++ b/chrome/test/nacl/nacl_browsertest.cc
@@ -60,22 +60,6 @@ NACL_BROWSER_TEST_F(NaClBrowserTest, ProgressEvents, {
RunNaClIntegrationTest(FILE_PATH_LITERAL("ppapi_progress_events.html"));
})
-// Note: currently not run on PNaCl because crash throttling causes the last few
-// tests to fail for the wrong reasons. Enabling this test would also require
-// creating a new set of manifests because shared NaCl/PNaCl manifests are not
-// allowed. Also not run on GLibc because it's a large test that is at risk of
-// causing timeouts.
-IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlib, Bad) {
- RunNaClIntegrationTest(FILE_PATH_LITERAL("ppapi_bad.html"));
-}
-
-// partially_invalid.c does not have an ARM version of its asm.
-#if !defined(__arm__)
-IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlib, BadNative) {
- RunNaClIntegrationTest(FILE_PATH_LITERAL("ppapi_bad_native.html"));
-}
-#endif
-
NACL_BROWSER_TEST_F(NaClBrowserTest, MAYBE_Crash, {
RunNaClIntegrationTest(FILE_PATH_LITERAL("ppapi_crash.html"));
})
diff --git a/ppapi/native_client/chrome_main.scons b/ppapi/native_client/chrome_main.scons
index c43b9a1..e8593a4 100644
--- a/ppapi/native_client/chrome_main.scons
+++ b/ppapi/native_client/chrome_main.scons
@@ -39,6 +39,7 @@ ppapi_scons_files['nonvariant_test_scons_files'] = [
'tests/nacl_browser/browser_dynamic_library/nacl.scons',
'tests/nacl_browser/manifest_file/nacl.scons',
'tests/nacl_browser/nameservice/nacl.scons',
+ 'tests/ppapi_browser/bad/nacl.scons',
'tests/ppapi_browser/extension_mime_handler/nacl.scons',
'tests/ppapi_browser/manifest/nacl.scons',
'tests/ppapi_test_lib/nacl.scons',
diff --git a/ppapi/native_client/tests/ppapi_browser/bad/nacl.scons b/ppapi/native_client/tests/ppapi_browser/bad/nacl.scons
new file mode 100644
index 0000000..28eeb4a
--- /dev/null
+++ b/ppapi/native_client/tests/ppapi_browser/bad/nacl.scons
@@ -0,0 +1,131 @@
+# -*- 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.
+#
+# Tests fatal errors that occur during loading.
+# (See ppapi_browser/crash for fatal errors that occur after loading).
+# TODO(polina): rename the directory and browser test to bad_load
+#
+# Manual testing with localhost:5103/scons-out/.../staging/ppapi_bad.html:
+# scons --mode=nacl ppapi_bad
+# Automatic testing:
+# scons run_ppapi_bad_browser_test
+#
+
+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/' +
+ 'bad')
+
+ppapi_bad_files = [
+ 'ppapi_bad.html',
+ 'ppapi_bad.js',
+ 'ppapi_bad_crossorigin.nmf',
+ 'ppapi_bad_doesnotexist.nmf',
+ 'ppapi_bad_magic.nmf',
+ 'ppapi_bad_manifest_uses_nexes.nmf',
+ 'ppapi_bad_manifest_bad_files.nmf',
+ 'ppapi_bad_manifest_nexe_arch.nmf',
+ env.File('${SCONSTRUCT_DIR}/tools/browser_tester/browserdata/nacltest.js')
+ ]
+ppapi_bad = env.Replicate('${STAGING_DIR}', ppapi_bad_files)
+
+nmf_names = []
+# Compile all nexes embedded into the above html
+# TODO(bbudge) Re-enable tests as the IPC proxy gets equivalent error reporting
+# or delete them after the proxy switch if they're specific to SRPC.
+# http://crbug.com/160076
+for kind in [ 'ppp_initialize', 'ppp_initialize_crash',
+ 'no_ppp_instance', 'get_ppp_instance_crash',
+ #'get_ppp_messaging_crash', 'get_ppp_printing_crash',
+ 'ppp_instance_didcreate', 'ppp_instance_didcreate_crash',
+ #'event_replay_crash'
+ ]:
+ bad_nmf = 'ppapi_bad_%s' % kind
+ bad_nexe = env.ProgramNameForNmf('ppapi_bad_%s' % kind)
+ env.ComponentProgram(bad_nexe,
+ ['ppapi_bad_%s.cc' % kind],
+ EXTRA_LIBS=['ppapi',
+ 'platform',
+ 'pthread',
+ 'gio'])
+ nmf_names.append(bad_nmf)
+ ppapi_bad_files.extend(env.ExtractPublishedFiles(bad_nexe))
+ env.Depends(ppapi_bad, env.Alias(bad_nexe))
+
+# "scons --mode=nacl ppapi_bad" will publish the html and all of its
+# dependencies to scons-out.
+env.Alias('ppapi_bad', ppapi_bad)
+
+node = env.PPAPIBrowserTester(
+ 'ppapi_bad_browser_test.out',
+ url='ppapi_bad.html',
+ nmf_names=nmf_names,
+ test_args=[('is_pnacl', int(env.Bit('pnacl_generate_pexe')))],
+ files=[env.File(f) for f in ppapi_bad_files],
+ args=['--allow_404'])
+
+# This test is failing on Windows:
+# crbug.com/98720
+# This test is failing on Valgrind because of multiple nexes.
+env.AddNodeToTestSuite(node,
+ ['chrome_browser_tests'],
+ 'run_ppapi_bad_browser_test',
+ is_broken=env.PPAPIBrowserTesterIsBroken() or
+ env.Bit('host_windows') or
+ env.Bit('running_on_valgrind'))
+
+
+# Bad nexe tests that won't work in PNaCl (native)
+# For example, partly_invalid.nexe has inline assembly in its source files.
+# Just bail out here for PNaCl, since the NMF will require the .nexe
+# to be built.
+if env.Bit('bitcode'):
+ Return()
+
+nacltest_js = env.File('${SCONSTRUCT_DIR}/tools/browser_tester/browserdata/' +
+ 'nacltest.js')
+partly_invalid = env.File('${STAGING_DIR}/partly_invalid${PROGSUFFIX}')
+nmf = '${TEST_DIR}/partly_invalid.nmf'
+if not env.Bit('nacl_glibc'):
+ ppapi_bad_native_files = [
+ env.File('ppapi_bad_native.html'),
+ env.File('${SCONSTRUCT_DIR}/tests/ppapi_browser/' +
+ 'progress_event_listener.js'),
+ nacltest_js]
+ replicated_files = env.Replicate('${STAGING_DIR}', ppapi_bad_native_files)
+ env.Alias('all_programs', replicated_files)
+ ppapi_bad_native_files.append(partly_invalid)
+
+ node = env.PPAPIBrowserTester(
+ 'ppapi_bad_native_test.out',
+ url='ppapi_bad_native.html',
+ nmfs=[nmf],
+ files=ppapi_bad_native_files,
+ )
+else:
+ ppapi_bad_native_files = [
+ env.File('${TEST_DIR}/ppapi_bad_native_glibc.html'),
+ nacltest_js]
+ replicated_files = env.Replicate('${STAGING_DIR}', ppapi_bad_native_files)
+ env.Alias('all_programs', replicated_files)
+ ppapi_bad_native_files.append(partly_invalid)
+
+ node = env.PPAPIBrowserTester(
+ 'ppapi_bad_native_test.out',
+ url='ppapi_bad_native_glibc.html',
+ nmfs=[nmf],
+ files=ppapi_bad_native_files,
+ nacl_exe_stderr={
+ 'file': '${TARGET_ROOT}/test_results/ppapi_bad_native_test.log',
+ 'golden': '${TEST_DIR}/ppapi_bad_native_glibc.stderr'}
+ )
+
+env.AddNodeToTestSuite(node,
+ ['chrome_browser_tests'],
+ 'run_ppapi_bad_native_test',
+ is_broken=env.PPAPIBrowserTesterIsBroken())
diff --git a/chrome/test/data/nacl/bad/partly_invalid.nmf b/ppapi/native_client/tests/ppapi_browser/bad/partly_invalid.nmf
index c5e122f..c5e122f 100644
--- a/chrome/test/data/nacl/bad/partly_invalid.nmf
+++ b/ppapi/native_client/tests/ppapi_browser/bad/partly_invalid.nmf
diff --git a/chrome/test/data/nacl/bad/ppapi_bad.html b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.html
index 4cb4285..8889403 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad.html
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<!--
- Copyright 2013 The Chromium Authors. All rights reserved.
+ 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.
-->
@@ -42,7 +42,8 @@ function couldNotLoadNexe(is_pnacl) {
}
function declareTests(tester) {
- var is_pnacl = getTestArguments()['pnacl'] !== undefined;
+ var test_args = getTestArguments({'is_pnacl': '0'});
+ var is_pnacl = parseInt(test_args['is_pnacl']);
var mime_type = "application/x-nacl";
if (is_pnacl) {
mime_type = "application/x-pnacl";
@@ -54,9 +55,23 @@ function declareTests(tester) {
'bad_magic',
'ppapi_bad_magic.nmf',
mime_type,
- is_pnacl
- ? 'NaCl module load failed: PnaclCoordinator: PNaCl Translator Error: Invalid PNaCl bitcode header'
- : 'NaCl module load failed: Bad ELF header magic number');
+ 'NaCl module load failed: Bad ELF header magic number');
+
+ // 'cross_origin' loads a manifest, then tries to load a cross-origin nexe.
+ badLoadTest(
+ tester,
+ 'cross_origin',
+ 'ppapi_bad_crossorigin.nmf',
+ mime_type,
+ couldNotAccessNexe(is_pnacl));
+
+ // 'cross_manifest' tries to load a cross-origin manifest.
+ badLoadTest(
+ tester,
+ 'cross_manifest',
+ 'http://www.google.com/crossorigin.manifest',
+ mime_type,
+ 'NaCl module load failed: access to manifest url was denied.');
// 'nonexistent_nexe' loads a manifest, then tries to load a nonexistent nexe.
badLoadTest(
@@ -107,9 +122,7 @@ function declareTests(tester) {
'bad_manifest_nexe_arch',
'ppapi_bad_manifest_nexe_arch.nmf',
mime_type,
- is_pnacl
- ? 'NaCl module load failed: manifest: no version of program given for portable.'
- : 'NaCl module load failed: manifest: no version of program given for current arch and no portable version found.');
+ 'NaCl module load failed: manifest: no version of program given for current arch and no portable version found.');
//////////////////////////////////////
// Initialization errors begin here //
diff --git a/chrome/test/data/nacl/bad/ppapi_bad.js b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.js
index bcd3fb0..4ab712b 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad.js
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.js
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright (c) 2013 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.
diff --git a/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_crossorigin.nmf b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_crossorigin.nmf
new file mode 100644
index 0000000..22dba61
--- /dev/null
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_crossorigin.nmf
@@ -0,0 +1,7 @@
+{
+ "program": {
+ "x86-32": {"url": "http://www.google.com/crossorigin.nexe"},
+ "x86-64": {"url": "http://www.google.com/crossorigin.nexe"},
+ "arm": {"url": "http://www.google.com/crossorigin.nexe"}
+ }
+}
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_doesnotexist.nmf b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_doesnotexist.nmf
index 8578bcb..8578bcb 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_doesnotexist.nmf
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_doesnotexist.nmf
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_event_replay_crash.cc b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_event_replay_crash.cc
index f3a8fb2..77c9591 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_event_replay_crash.cc
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_event_replay_crash.cc
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// 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.
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_get_ppp_instance_crash.cc b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_get_ppp_instance_crash.cc
index a9f6c8d..44328de 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_get_ppp_instance_crash.cc
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_get_ppp_instance_crash.cc
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// 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.
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_get_ppp_messaging_crash.cc b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_get_ppp_messaging_crash.cc
index 8b77c2f..481b5db 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_get_ppp_messaging_crash.cc
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_get_ppp_messaging_crash.cc
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// 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.
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_get_ppp_printing_crash.cc b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_get_ppp_printing_crash.cc
index 54f1442..c2b660e 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_get_ppp_printing_crash.cc
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_get_ppp_printing_crash.cc
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// 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.
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_magic.nmf b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_magic.nmf
index 756c42e..756c42e 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_magic.nmf
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_magic.nmf
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_manifest_bad_files.nmf b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_manifest_bad_files.nmf
index 588901b..588901b 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_manifest_bad_files.nmf
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_manifest_bad_files.nmf
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_manifest_nexe_arch.nmf b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_manifest_nexe_arch.nmf
index 8ef44e9..8ef44e9 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_manifest_nexe_arch.nmf
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_manifest_nexe_arch.nmf
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_manifest_uses_nexes.nmf b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_manifest_uses_nexes.nmf
index 286ed7b..286ed7b 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_manifest_uses_nexes.nmf
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_manifest_uses_nexes.nmf
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_native.html b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_native.html
index 3004e05..3004e05 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_native.html
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_native.html
diff --git a/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_native_glibc.html b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_native_glibc.html
new file mode 100644
index 0000000..ef03798
--- /dev/null
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_native_glibc.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <!-- Copyright 2011 Google Inc. All rights reserved. -->
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
+ <META HTTP-EQUIV="Expires" CONTENT="-1" />
+ <script type="text/javascript" src="nacltest.js"> </script>
+ <title> PPAPI bad manifest/nexe URLs, glibc. </title>
+ </head>
+ <body id="body">
+ <embed id="partly_invalid"
+ class="naclModule"
+ width=100 height=20
+ src="partly_invalid.nmf"
+ style="background-color:gray"
+ type="application/x-nacl" />
+
+ <script type="text/javascript">
+ //<![CDATA[
+ var tester = new Tester($('body'));
+ tester.loadErrorsAreOK();
+ // This is a dummy test so that we can check output of runnable-ld.so
+ // using golden file.
+ tester.addAsyncTest('load_finished', function(status) {
+ status.expectEvent($('partly_invalid'), 'load', function(event) {
+ status.fail();
+ });
+ status.expectEvent($('partly_invalid'), 'loadend', function(event) {
+ status.pass();
+ });
+ });
+ tester.run();
+ //]]>
+ </script>
+ </body>
+</html>
diff --git a/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_native_glibc.stderr b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_native_glibc.stderr
new file mode 100644
index 0000000..27378c5
--- /dev/null
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_native_glibc.stderr
@@ -0,0 +1 @@
+/lib/main.nexe: error while loading shared libraries: /lib/main.nexe: failed to load code from shared object: Invalid argument \ No newline at end of file
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_no_ppp_instance.cc b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_no_ppp_instance.cc
index 384961b..699cd46 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_no_ppp_instance.cc
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_no_ppp_instance.cc
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// 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.
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_ppp_initialize.cc b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_ppp_initialize.cc
index 429cabd..7b6a3b7 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_ppp_initialize.cc
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_ppp_initialize.cc
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// 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.
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_ppp_initialize_crash.cc b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_ppp_initialize_crash.cc
index 983c155..9910f3a 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_ppp_initialize_crash.cc
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_ppp_initialize_crash.cc
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// 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.
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_ppp_instance_didcreate.cc b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_ppp_instance_didcreate.cc
index b86569e7..6d30708 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_ppp_instance_didcreate.cc
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_ppp_instance_didcreate.cc
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// 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.
diff --git a/chrome/test/data/nacl/bad/ppapi_bad_ppp_instance_didcreate_crash.cc b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_ppp_instance_didcreate_crash.cc
index 2fd4ec6..0b4b7da 100644
--- a/chrome/test/data/nacl/bad/ppapi_bad_ppp_instance_didcreate_crash.cc
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad_ppp_instance_didcreate_crash.cc
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// 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.