Add very simple loading test for non-SFI NaCl.
[chromium-blink-merge.git] / chrome / test / data / nacl / nonsfi / libc_free.html
blobbb866552616196ae0ef02b0a3ece2927779328cb
1 <html>
2 <!--
3 Copyright 2014 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.
6 -->
7 <head>
8 <title>NaCl Load Test</title>
9 </head>
10 <body>
11 <h2>NaCl Load Test</h2>
12 </body>
13 <script type="text/javascript" src="nacltest.js"> </script>
14 <script>
16 function report(msg) {
17 domAutomationController.setAutomationId(0);
18 // The automation controller seems to choke on Objects, so turn them into
19 // strings.
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 embed.addEventListener("load", function(evt) {
28 report({type: "Shutdown", message: "1 test passed.", passed: true});
29 }, true);
30 embed.addEventListener("error", function(evt) {
31 report({type: "Log", message: "Load error: " + embed.lastError});
32 report({type: "Shutdown", message: "1 test failed.", passed: false});
33 }, true);
34 document.body.appendChild(embed);
37 create("libc_free.nmf");
38 </script>
39 </html>