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

Side by Side Diff: trunk/src/chrome/test/data/nacl/nacl_load_test.html

Issue 15709012: Revert 205329 "Split pnacl and nacl mime types" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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
1 <html> 1 <html>
2 <!-- 2 <!--
3 Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 <head> 7 <head>
8 <title>NaCl Load Test</title> 8 <title>NaCl Load Test</title>
9 </head> 9 </head>
10 <body> 10 <body>
11 <h2>NaCl Load Test</h2> 11 <h2>NaCl Load Test</h2>
12 </body> 12 </body>
13 <script type="text/javascript" src="nacltest.js"> </script>
14 <script> 13 <script>
15 14
16 function report(msg) { 15 function report(msg) {
17 domAutomationController.setAutomationId(0); 16 domAutomationController.setAutomationId(0);
18 // The automation controller seems to choke on Objects, so turn them into 17 // The automation controller seems to choke on Objects, so turn them into
19 // strings. 18 // strings.
20 domAutomationController.send(JSON.stringify(msg)); 19 domAutomationController.send(JSON.stringify(msg));
21 } 20 }
22 21
23 function create(manifest_url) { 22 function create(manifest_url) {
24 var embed = document.createElement("embed"); 23 var embed = document.createElement("embed");
25 embed.src = manifest_url; 24 embed.src = manifest_url;
26 embed.type = "application/x-nacl"; 25 embed.type = "application/x-nacl";
27 if (getTestArguments()["pnacl"] !== undefined) {
28 embed.type = "application/x-pnacl";
29 }
30 26
31 embed.addEventListener("load", function(evt) { 27 embed.addEventListener("load", function(evt) {
32 report({type: "Shutdown", message: "1 test passed.", passed: true}); 28 report({type: "Shutdown", message: "1 test passed.", passed: true});
33 }, true); 29 }, true);
34 30
35 embed.addEventListener("error", function(evt) { 31 embed.addEventListener("error", function(evt) {
36 report({type: "Log", message: "Load error: " + embed.lastError}); 32 report({type: "Log", message: "Load error: " + embed.lastError});
37 report({type: "Shutdown", message: "1 test failed.", passed: false}); 33 report({type: "Shutdown", message: "1 test failed.", passed: false});
38 }, true); 34 }, true);
39 35
40 document.body.appendChild(embed); 36 document.body.appendChild(embed);
41 } 37 }
42 38
43 create("simple.nmf"); 39 create("simple.nmf");
44 </script> 40 </script>
45 </html> 41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698