Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / test / data / nacl / nonsfi / irt_test.html
1 <html>
2 <!--
3 Copyright 2014 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
6 -->
7 <!-- libc_free.html tests for basic load up. This file contains test
8 about IRT functionality.  -->
9 <head>
10 <title>NonSFI NaCl IRT Basic Test</title>
11 </head>
12 <body>
13 <h2>NonSFI NaCl IRT Basic Test</h2>
14 <script type="text/javascript" src="nacltest.js"> </script>
15 <script>
16
17 function create(manifest_url) {
18   var embed = document.createElement('embed');
19   embed.src = manifest_url;
20   embed.type = 'application/x-nacl';
21   embed.basic_tests = '2';
22   embed.stress_tests = '0';
23   return embed;
24 }
25
26 function setupTests(tester, plugin) {
27   tester.addAsyncTest('TestRandom', function(status) {
28     plugin.addEventListener('message', function(message_event) {
29       this.removeEventListener('message', arguments.callee, false);
30       status.assertEqual(message_event.data, 'randomsuccess');
31       status.pass();
32     }, false);
33     plugin.postMessage('random');
34   });
35 };
36
37 var embed = create("libc_free.nmf");
38 document.body.appendChild(embed);
39
40 var tester = new Tester();
41 setupTests(tester, embed);
42 tester.waitFor(embed);
43 tester.run();
44
45 </script>
46 </body>
47 </html>