OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
Mark Seaborn
2012/08/13 22:16:59
Shouldn't this file have a copyright message? The
Nick Bray (chromium)
2012/08/13 23:16:26
The cases where we have copyright notices in html
| |
2 <head> | |
3 <title>NaCl Load Test</title> | |
4 </head> | |
5 <body> | |
6 <h2>NaCl Load Test</h2> | |
7 </body> | |
8 <script> | |
9 | |
10 function report(msg) { | |
11 domAutomationController.setAutomationId(0); | |
12 // The automation controller seems to choke on Objects, so turn them into | |
13 // strings. | |
14 domAutomationController.send(JSON.stringify(msg)); | |
15 } | |
16 | |
17 function create(manifest_url) { | |
18 var e = document.createElement("embed"); | |
Mark Seaborn
2012/08/13 22:16:59
Nit: use single quotes for consistency? Also, ren
Nick Bray (chromium)
2012/08/13 23:16:26
Done.
| |
19 e.src = manifest_url; | |
20 e.type = "application/x-nacl"; | |
21 | |
22 e.addEventListener('load', function(evt) { | |
23 report({type: "Shutdown", message: "1 test passed.", passed: true}); | |
24 }, true); | |
25 | |
26 e.addEventListener('error', function(evt) { | |
27 report({type: "Log", message: "Load error: " + e.lastError}); | |
28 report({type: "Shutdown", message: "1 test failed.", passed: false}); | |
29 }, true); | |
30 | |
31 document.body.appendChild(e); | |
32 } | |
33 | |
34 create("simple.nmf"); | |
35 </script> | |
36 </html> | |
OLD | NEW |