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
5 found in the LICENSE file.
8 <title>NaCl Load Test
</title>
11 <h2>NaCl Load Test
</h2>
13 <script type=
"text/javascript" src=
"nacltest.js"> </script>
16 function report(msg
) {
17 domAutomationController
.setAutomationId(0);
18 // The automation controller seems to choke on Objects, so turn them into
20 domAutomationController
.send(JSON
.stringify(msg
));
23 function create(manifest_url
) {
24 var embed
= document
.createElement("embed");
25 embed
.src
= manifest_url
;
26 embed
.type
= "application/x-nacl";
27 if (getTestArguments()["pnacl"] !== undefined) {
28 embed
.type
= "application/x-pnacl";
31 embed
.addEventListener("load", function(evt
) {
32 report({type
: "Shutdown", message
: "1 test passed.", passed
: true});
35 embed
.addEventListener("error", function(evt
) {
36 report({type
: "Log", message
: "Load error: " + embed
.lastError
});
37 report({type
: "Shutdown", message
: "1 test failed.", passed
: false});
40 document
.body
.appendChild(embed
);