3 Copyright (c) 2013 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>
9 <script type=
"text/javascript" src=
"nacltest.js"></script>
12 <h2>PNaCl Load Options Test
</h2>
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_prefix
, manifest_opt
) {
24 var embed
= document
.createElement("embed");
25 var nmf_url
= manifest_prefix
+ manifest_opt
+ ".nmf";
28 embed
.type
= "application/x-pnacl";
30 embed
.addEventListener("load", function(evt
) {
31 report({type
: "Shutdown", message
: "1 test passed.", passed
: true});
34 embed
.addEventListener("error", function(evt
) {
35 report({type
: "Log", message
: "Load error: " + embed
.lastError
});
36 report({type
: "Shutdown", message
: "1 test failed.", passed
: false});
39 document
.body
.appendChild(embed
);
42 var nmf_to_test
= getTestArguments(
43 {'use_nmf' : 'Unknown NMF choice'})['use_nmf'];
45 create("pnacl_", nmf_to_test
);