OLD | NEW |
(Empty) | |
| 1 <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"); |
| 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 |