OLD | NEW |
---|---|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
3 <html> | 3 <html> |
4 <!-- | 4 <!-- |
5 Copyright (c) 2012 The Chromium Authors. All rights reserved. | 5 Copyright (c) 2012 The Chromium Authors. All rights reserved. |
6 Use of this source code is governed by a BSD-style license that can be | 6 Use of this source code is governed by a BSD-style license that can be |
7 found in the LICENSE file. | 7 found in the LICENSE file. |
8 --> | 8 --> |
9 <head> | 9 <head> |
10 <META HTTP-EQUIV="Pragma" CONTENT="no-cache" /> | 10 <META HTTP-EQUIV="Pragma" CONTENT="no-cache" /> |
11 <META HTTP-EQUIV="Expires" CONTENT="-1" /> | 11 <META HTTP-EQUIV="Expires" CONTENT="-1" /> |
12 <script type="text/javascript" src="nacltest.js"> </script> | 12 <script type="text/javascript" src="nacltest.js"> </script> |
13 <script type="text/javascript" src="ppapi_bad.js"> </script> | 13 <script type="text/javascript" src="ppapi_bad.js"> </script> |
14 <title> PPAPI bad manifest/nexe URLs </title> | 14 <title> PPAPI bad manifest/nexe URLs </title> |
15 <style type="text/css"> | 15 <style type="text/css"> |
16 .naclModule { background-color: gray; margin: 2px 2px; } | 16 .naclModule { background-color: gray; margin: 2px 2px; } |
17 </style> | 17 </style> |
18 </head> | 18 </head> |
19 <body id="body"> | 19 <body id="body"> |
20 <script type="text/javascript"> | 20 <script type="text/javascript"> |
21 //<![CDATA[ | 21 //<![CDATA[ |
22 | 22 |
23 // PNaCl may have slightly different error messages (pexe instead of nexe). | 23 // PNaCl may have slightly different error messages (pexe instead of nexe). |
24 function couldNotLoadNexe(is_pnacl, expected_pp_error) { | 24 function couldNotLoadNexe(is_pnacl, pnacl_refinement) { |
25 if (!is_pnacl) { | 25 if (!is_pnacl) { |
26 return 'NaCl module load failed: could not load nexe url.'; | 26 return 'NaCl module load failed: could not load nexe url.'; |
27 } else { | 27 } else { |
28 return 'NaCl module load failed: PnaclCoordinator: pexe load failed ' + | 28 return 'NaCl module load failed: PnaclCoordinator: pexe load failed' + |
29 '(pp_error=' + expected_pp_error + ').'; | 29 pnacl_refinement; |
Derek Schuff
2013/01/16 16:50:51
might make more sense to put the parens and the pe
jvoung (off chromium)
2013/01/16 17:30:30
Done.
| |
30 } | 30 } |
31 } | 31 } |
32 | 32 |
33 function declareTests(tester) { | 33 function declareTests(tester) { |
34 var test_args = getTestArguments({'is_pnacl': '0'}); | 34 var test_args = getTestArguments({'is_pnacl': '0'}); |
35 var is_pnacl = parseInt(test_args['is_pnacl']); | 35 var is_pnacl = parseInt(test_args['is_pnacl']); |
36 | 36 |
37 // 'bad_magic' loads a manifest, then loads a nexe that tests as invalid. | 37 // 'bad_magic' loads a manifest, then loads a nexe that tests as invalid. |
38 badLoadTest( | 38 badLoadTest( |
39 tester, | 39 tester, |
40 'bad_magic', | 40 'bad_magic', |
41 'ppapi_bad_magic.nmf', | 41 'ppapi_bad_magic.nmf', |
42 'NaCl module load failed: Too many program header entries in ELF file'); | 42 'NaCl module load failed: Too many program header entries in ELF file'); |
43 | 43 |
44 // 'cross_origin' loads a manifest, then tries to load a cross-origin nexe. | 44 // 'cross_origin' loads a manifest, then tries to load a cross-origin nexe. |
45 badLoadTest( | 45 badLoadTest( |
46 tester, | 46 tester, |
47 'cross_origin', | 47 'cross_origin', |
48 'ppapi_bad_crossorigin.nmf', | 48 'ppapi_bad_crossorigin.nmf', |
49 couldNotLoadNexe(is_pnacl, -7 /* PP_ERROR_NOACCESS */)); | 49 couldNotLoadNexe(is_pnacl, ' (no access).')); |
50 | 50 |
51 // 'cross_manifest' tries to load a cross-origin manifest. | 51 // 'cross_manifest' tries to load a cross-origin manifest. |
52 badLoadTest( | 52 badLoadTest( |
53 tester, | 53 tester, |
54 'cross_manifest', | 54 'cross_manifest', |
55 'http://www.google.com/crossorigin.manifest', | 55 'http://www.google.com/crossorigin.manifest', |
56 'NaCl module load failed: could not load manifest url.'); | 56 'NaCl module load failed: could not load manifest url.'); |
57 | 57 |
58 // 'nonexistent_nexe' loads a manifest, then tries to load a nonexistent nexe, | 58 // 'nonexistent_nexe' loads a manifest, then tries to load a nonexistent nexe, |
59 // given both a nexe and a portable program to choose from. | 59 // given both a nexe and a portable program to choose from. |
60 badLoadTest( | 60 badLoadTest( |
61 tester, | 61 tester, |
62 'nonexistent_nexe', | 62 'nonexistent_nexe', |
63 'ppapi_bad_doesnotexist.nmf', | 63 'ppapi_bad_doesnotexist.nmf', |
64 couldNotLoadNexe(is_pnacl, -2 /* PP_ERROR_FAILED */)); | 64 couldNotLoadNexe(is_pnacl, ' (pp_error=-2).' /* PP_ERROR_FAILED */)); |
65 | 65 |
66 // 'nonexistent_nexe_only' loads a manifest, then tries to load a nonexistent | 66 // 'nonexistent_nexe_only' loads a manifest, then tries to load a nonexistent |
67 // nexe, given only a nexe to choose from. | 67 // nexe, given only a nexe to choose from. |
68 badLoadTest( | 68 badLoadTest( |
69 tester, | 69 tester, |
70 'nonexistent_nexe_only', | 70 'nonexistent_nexe_only', |
71 'ppapi_bad_doesnotexist_nexe_only.nmf', | 71 'ppapi_bad_doesnotexist_nexe_only.nmf', |
72 'NaCl module load failed: could not load nexe url.'); | 72 'NaCl module load failed: could not load nexe url.'); |
73 | 73 |
74 // 'nonexistent_manifest' tries to load a nonexistent manifest. | 74 // 'nonexistent_manifest' tries to load a nonexistent manifest. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
204 style="background-color:gray" | 204 style="background-color:gray" |
205 type="application/pdf" /> | 205 type="application/pdf" /> |
206 | 206 |
207 <script type="text/javascript"> | 207 <script type="text/javascript"> |
208 //<![CDATA[ | 208 //<![CDATA[ |
209 runTests(); | 209 runTests(); |
210 //]]> | 210 //]]> |
211 </script> | 211 </script> |
212 </body> | 212 </body> |
213 </html> | 213 </html> |
OLD | NEW |