Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: chrome/test/data/nacl/nacl_load_test.html

Issue 10837207: Add NaCl smoke test to browser_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698