Chromium Code Reviews| Index: chrome/test/data/nacl/nacl_load_test.html |
| diff --git a/chrome/test/data/nacl/nacl_load_test.html b/chrome/test/data/nacl/nacl_load_test.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0898c8a94ef724f22add7d9e8532fdfc48d681a1 |
| --- /dev/null |
| +++ b/chrome/test/data/nacl/nacl_load_test.html |
| @@ -0,0 +1,36 @@ |
| +<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
|
| +<head> |
| +<title>NaCl Load Test</title> |
| +</head> |
| +<body> |
| +<h2>NaCl Load Test</h2> |
| +</body> |
| +<script> |
| + |
| +function report(msg) { |
| + domAutomationController.setAutomationId(0); |
| + // The automation controller seems to choke on Objects, so turn them into |
| + // strings. |
| + domAutomationController.send(JSON.stringify(msg)); |
| +} |
| + |
| +function create(manifest_url) { |
| + 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.
|
| + e.src = manifest_url; |
| + e.type = "application/x-nacl"; |
| + |
| + e.addEventListener('load', function(evt) { |
| + report({type: "Shutdown", message: "1 test passed.", passed: true}); |
| + }, true); |
| + |
| + e.addEventListener('error', function(evt) { |
| + report({type: "Log", message: "Load error: " + e.lastError}); |
| + report({type: "Shutdown", message: "1 test failed.", passed: false}); |
| + }, true); |
| + |
| + document.body.appendChild(e); |
| +} |
| + |
| +create("simple.nmf"); |
| +</script> |
| +</html> |