Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.html

Issue 7740013: Cloning a bunch of stuff from the native_client repository at r6528 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4 <!--
5 Copyright (c) 2011 The Native Client Authors. All rights reserved.
6 Use of this source code is governed by a BSD-style license that can be
7 found in the LICENSE file.
8 -->
9 <head>
10 <META HTTP-EQUIV="Pragma" CONTENT="no-cache" />
11 <META HTTP-EQUIV="Expires" CONTENT="-1" />
12 <script type="text/javascript" src="nacltest.js"> </script>
13 <script type="text/javascript" src="ppapi_bad.js"> </script>
14 <title> PPAPI bad manifest/nexe URLs </title>
15 <style type="text/css">
16 .naclModule { background-color: gray; margin: 2px 2px; }
17 </style>
18 </head>
19 <body id="body">
20 <script type="text/javascript">
21 //<![CDATA[
22
23 function declareTests(tester) {
24 // 'bad_magic' loads a manifest, then loads a nexe that tests as invalid.
25 badLoadTest(
26 tester,
27 'bad_magic',
28 'ppapi_bad_magic.nmf',
29 'NaCl module load failed: Too many program header entries in ELF file');
30
31 // 'cross_origin' loads a manifest, then tries to load a cross-origin nexe.
32 badLoadTest(
33 tester,
34 'cross_origin',
35 'ppapi_bad_crossorigin.nmf',
36 'NaCl module load failed: could not load nexe url.');
37
38 // 'cross_manifest' tries to load a cross-origin manifest.
39 badLoadTest(
40 tester,
41 'cross_manifest',
42 'http://www.google.com/crossorigin.manifest',
43 'NaCl module load failed: could not load manifest url.');
44
45 // 'nonexistent_nexe' loads a manifest, then tries to load a nonexistent nexe,
46 // given both a nexe and a portable program to choose from.
47 badLoadTest(
48 tester,
49 'nonexistent_nexe',
50 'ppapi_bad_doesnotexist.nmf',
51 'NaCl module load failed: could not load nexe url.');
52
53 // 'nonexistent_nexe_only' loads a manifest, then tries to load a nonexistent
54 // nexe, given only a nexe to choose from.
55 badLoadTest(
56 tester,
57 'nonexistent_nexe_only',
58 'ppapi_bad_doesnotexist_nexe_only.nmf',
59 'NaCl module load failed: could not load nexe url.');
60
61 // 'nonexistent_manifest' tries to load a nonexistent manifest.
62 badLoadTest(
63 tester,
64 'nonexistent_manifest',
65 'doesnotexist.manifest',
66 'NaCl module load failed: could not load manifest url.');
67
68 // 'bad_manifest' loads an invalid manifest.
69 badLoadTest(
70 tester,
71 'bad_manifest',
72 'ppapi_bad.html',
73 'NaCl module load failed: manifest JSON parsing failed: * Line 1, Column 1 \n Syntax error: value, object or array expected.\n');
74
75 // 'bad_manifest_uses_nexes' loads a manifest with an obsolete 'nexes' section .
76 badLoadTest(
77 tester,
78 'bad_manifest_uses_nexes',
79 'ppapi_bad_manifest_uses_nexes.nmf',
80 'NaCl module load failed: manifest: missing \'program\' section.');
81
82 // 'bad_manifest_bad_files' loads a manifest with a bad 'files' section.
83 badLoadTest(
84 tester,
85 'bad_manifest_bad_files',
86 'ppapi_bad_manifest_bad_files.nmf',
87 'NaCl module load failed: manifest: file \'file.txt\' no version given for current arch and no portable version found.');
88
89 //////////////////////////////////////
90 // Initialization errors begin here //
91 //////////////////////////////////////
92
93 // 'bad_ppp_initialize' loads a manifest, then loads a nexe that fails to
94 // initialize PPAPI module
95 badLoadTest(
96 tester,
97 'bad_ppp_initialize',
98 'ppapi_bad_ppp_initialize.nmf',
99 'NaCl module load failed: could not initialize module.');
100
101 // 'bad_ppp_initialize_crash' loads a manifest, then loads a nexe that crashes
102 // before initializing PPAPI module
103 badLoadTest(
104 tester,
105 'bad_ppp_initialize_crash',
106 'ppapi_bad_ppp_initialize_crash.nmf',
107 'NaCl module load failed: could not initialize module.');
108
109 // 'bad_no_ppp_instance' loads a manifest, then loads a nexe that fails to
110 // get the required PPP_Instance interface
111 badLoadTest(
112 tester,
113 'bad_no_ppp_instance',
114 'ppapi_bad_no_ppp_instance.nmf',
115 'NaCl module load failed: could not initialize module.');
116
117 // 'bad_get_ppp_instance_crash' loads a manifest, then loads a nexe that
118 // crashes when getting the required PPP_Instance interface
119 badLoadTest(
120 tester,
121 'bad_get_ppp_instance_crash',
122 'ppapi_bad_get_ppp_instance_crash.nmf',
123 'NaCl module load failed: could not initialize module.');
124
125 // 'bad_get_ppp_messaging_crash' loads a manifest, then loads a nexe that
126 // crashes when getting the optional PPP_Messaging interface, which is done
127 // on init.
128 badLoadTest(
129 tester,
130 'bad_get_ppp_messaging_crash',
131 'ppapi_bad_get_ppp_messaging_crash.nmf',
132 'NaCl module load failed: could not initialize module.');
133
134 // 'bad_get_ppp_printing_crash' loads a manifest, then loads a nexe that
135 // crashes when getting the optional PPP_Printing interface, which is done
136 // right after creation, but before loadEnd is dispatched.
137 badLoadTest(
138 tester,
139 'bad_get_ppp_printing_crash',
140 'ppapi_bad_get_ppp_printing_crash.nmf',
141 'NaCl module load failed: instance crashed after creation.');
142
143 // 'bad_ppp_instance_didcreate' loads a manifest, then loads a nexe that fails
144 // to create the instance
145 badLoadTest(
146 tester,
147 'bad_ppp_instance_didcreate',
148 'ppapi_bad_ppp_instance_didcreate.nmf',
149 'NaCl module load failed: could not create instance.');
150
151 // 'bad_ppp_instance_didcreate_crash' loads a manifest, then loads a nexe that
152 // crashes before creating the instance.
153 badLoadTest(
154 tester,
155 'bad_ppp_instance_didcreate_crash',
156 'ppapi_bad_ppp_instance_didcreate_crash.nmf',
157 'NaCl module load failed: could not create instance.');
158
159 // 'bad_event_replay_crash' loads a manifest, then loads a nexe and replays
160 // the events that occured during loading causing the nexe to crash before
161 // proxy start-up was completed.
162 badLoadTest(
163 tester,
164 'bad_event_replay_crash',
165 'ppapi_bad_event_replay_crash.nmf',
166 'NaCl module load failed: instance crashed after creation.');
167 }
168
169
170 // The driver invoked when the body has finished loading.
171 function runTests() {
172 var tester = new Tester($('body'));
173 tester.loadErrorsAreOK();
174 declareTests(tester);
175 tester.run();
176 }
177 //]]>
178 </script>
179
180 <!-- The tests will create and remove embeds from this div. -->
181 <div id="embeds"></div>
182
183 <!-- These two embeds are not automatically tested - visual inspection only. -->
184
185 <embed id="cross_manifest_pdf"
186 width=100 height=20
187 src="http://www.google.com/crossorigin.manifest"
188 style="background-color:gray"
189 type="application/pdf" />
190
191 <!-- This load would have succeeded if the NEXE was from a chrome-extension
192 URL and NaCl had been registered as handling the PDF MIME type using
193 the nacl_modules attribute in a Chrome extension manifest. -->
194
195 <embed id="cross_origin_pdf"
196 width=100 height=20
197 src="ppapi_bad_crossorigin.nmf"
198 style="background-color:gray"
199 type="application/pdf" />
200
201 <script type="text/javascript">
202 //<![CDATA[
203 runTests();
204 //]]>
205 </script>
206 </body>
207 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698