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..a9e203b1f6039b5954f85995ebaa1063ebff33d6 |
--- /dev/null |
+++ b/chrome/test/data/nacl/nacl_load_test.html |
@@ -0,0 +1,41 @@ |
+<html> |
+<!-- |
+Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+Use of this source code is governed by a BSD-style license that can be |
+found in the LICENSE file. |
+--> |
+<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 embed = document.createElement("embed"); |
+ embed.src = manifest_url; |
+ embed.type = "application/x-nacl"; |
+ |
+ embed.addEventListener("load", function(evt) { |
+ report({type: "Shutdown", message: "1 test passed.", passed: true}); |
+ }, true); |
+ |
+ embed.addEventListener("error", function(evt) { |
+ report({type: "Log", message: "Load error: " + embed.lastError}); |
+ report({type: "Shutdown", message: "1 test failed.", passed: false}); |
+ }, true); |
+ |
+ document.body.appendChild(embed); |
+} |
+ |
+create("simple.nmf"); |
+</script> |
+</html> |