Index: ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.html |
diff --git a/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.html b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.html |
index 7a0aafc19b9730a7c4586049daf5cb663ed30042..572ebdf4072322a63cc0d2fe107fa5062215f5b7 100644 |
--- a/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.html |
+++ b/ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.html |
@@ -44,12 +44,17 @@ function couldNotLoadNexe(is_pnacl) { |
function declareTests(tester) { |
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"; |
+ } |
// 'bad_magic' loads a manifest, then loads a nexe that tests as invalid. |
badLoadTest( |
tester, |
'bad_magic', |
'ppapi_bad_magic.nmf', |
+ mime_type, |
'NaCl module load failed: Bad ELF header magic number'); |
// 'cross_origin' loads a manifest, then tries to load a cross-origin nexe. |
@@ -57,6 +62,7 @@ function declareTests(tester) { |
tester, |
'cross_origin', |
'ppapi_bad_crossorigin.nmf', |
+ mime_type, |
couldNotAccessNexe(is_pnacl)); |
// 'cross_manifest' tries to load a cross-origin manifest. |
@@ -64,6 +70,7 @@ function declareTests(tester) { |
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, |
@@ -72,6 +79,7 @@ function declareTests(tester) { |
tester, |
'nonexistent_nexe', |
'ppapi_bad_doesnotexist.nmf', |
+ mime_type, |
couldNotLoadNexe(is_pnacl)); |
// 'nonexistent_nexe_only' loads a manifest, then tries to load a nonexistent |
@@ -80,6 +88,7 @@ function declareTests(tester) { |
tester, |
'nonexistent_nexe_only', |
'ppapi_bad_doesnotexist_nexe_only.nmf', |
+ mime_type, |
'NaCl module load failed: could not load nexe url.'); |
// 'nonexistent_manifest' tries to load a nonexistent manifest. |
@@ -87,6 +96,7 @@ function declareTests(tester) { |
tester, |
'nonexistent_manifest', |
'doesnotexist.manifest', |
+ mime_type, |
'NaCl module load failed: could not load manifest url.'); |
// 'bad_manifest' loads an invalid manifest. |
@@ -94,6 +104,7 @@ function declareTests(tester) { |
tester, |
'bad_manifest', |
'ppapi_bad.html', |
+ mime_type, |
'NaCl module load failed: manifest JSON parsing failed: * Line 1, Column 1\n Syntax error: value, object or array expected.\n'); |
// 'bad_manifest_uses_nexes' loads a manifest with an obsolete 'nexes' section. |
@@ -101,6 +112,7 @@ function declareTests(tester) { |
tester, |
'bad_manifest_uses_nexes', |
'ppapi_bad_manifest_uses_nexes.nmf', |
+ mime_type, |
'NaCl module load failed: manifest: missing \'program\' section.'); |
// 'bad_manifest_bad_files' loads a manifest with a bad 'files' section. |
@@ -108,9 +120,10 @@ function declareTests(tester) { |
tester, |
'bad_manifest_bad_files', |
'ppapi_bad_manifest_bad_files.nmf', |
+ mime_type, |
// Manifest loader expects either 'url' or 'pnacl-translate' key present. |
// If neither is found, it complains about the last one. |
- 'NaCl module load failed: manifest: file.txt property \'unknown_arch\' does not have required key: \'pnacl-translate\'.'); |
+ 'NaCl module load failed: manifest: file.txt property \'unknown_arch\' does not have required key: \'url\'.'); |
// 'bad_manifest_nexe_arch' loads a manifest with no program entry for the |
// user's architecture |
@@ -118,6 +131,7 @@ function declareTests(tester) { |
tester, |
'bad_manifest_nexe_arch', |
'ppapi_bad_manifest_nexe_arch.nmf', |
+ mime_type, |
'NaCl module load failed: manifest: no version of program given for current arch and no portable version found.'); |
////////////////////////////////////// |
@@ -130,6 +144,7 @@ function declareTests(tester) { |
tester, |
'bad_ppp_initialize', |
'ppapi_bad_ppp_initialize.nmf', |
+ mime_type, |
'NaCl module load failed: could not initialize module.'); |
// 'bad_ppp_initialize_crash' loads a manifest, then loads a nexe that crashes |
@@ -138,6 +153,7 @@ function declareTests(tester) { |
tester, |
'bad_ppp_initialize_crash', |
'ppapi_bad_ppp_initialize_crash.nmf', |
+ mime_type, |
'NaCl module load failed: could not initialize module.'); |
// 'bad_no_ppp_instance' loads a manifest, then loads a nexe that fails to |
@@ -146,6 +162,7 @@ function declareTests(tester) { |
tester, |
'bad_no_ppp_instance', |
'ppapi_bad_no_ppp_instance.nmf', |
+ mime_type, |
'NaCl module load failed: could not initialize module.'); |
// 'bad_get_ppp_instance_crash' loads a manifest, then loads a nexe that |
@@ -154,6 +171,7 @@ function declareTests(tester) { |
tester, |
'bad_get_ppp_instance_crash', |
'ppapi_bad_get_ppp_instance_crash.nmf', |
+ mime_type, |
'NaCl module load failed: could not initialize module.'); |
// 'bad_ppp_instance_didcreate' loads a manifest, then loads a nexe that fails |
@@ -162,6 +180,7 @@ function declareTests(tester) { |
tester, |
'bad_ppp_instance_didcreate', |
'ppapi_bad_ppp_instance_didcreate.nmf', |
+ mime_type, |
'NaCl module load failed: could not create instance.'); |
// 'bad_ppp_instance_didcreate_crash' loads a manifest, then loads a nexe that |
@@ -170,6 +189,7 @@ function declareTests(tester) { |
tester, |
'bad_ppp_instance_didcreate_crash', |
'ppapi_bad_ppp_instance_didcreate_crash.nmf', |
+ mime_type, |
'NaCl module load failed: could not create instance.'); |
/* TODO(bbudge) Re-enable this test when the IPC proxy can report these errors. |
@@ -181,6 +201,7 @@ function declareTests(tester) { |
tester, |
'bad_event_replay_crash', |
'ppapi_bad_event_replay_crash.nmf', |
+ mime_type, |
'NaCl module load failed: instance crashed after creation.'); |
*/ |
} |