OLD | NEW |
---|---|
1 <!-- | 1 <!-- |
2 Copyright 2014 The Chromium Authors. All rights reserved. | 2 Copyright 2014 The Chromium Authors. All rights reserved. |
3 Use of this source code is governed by a BSD-style license that can | 3 Use of this source code is governed by a BSD-style license that can |
4 be found in the LICENSE file. | 4 be found in the LICENSE file. |
5 --> | 5 --> |
6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
7 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 7 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
8 <html> | 8 <html> |
9 <head> | 9 <head> |
10 <meta http-equiv="Pragma" content="no-cache" /> | 10 <meta http-equiv="Pragma" content="no-cache" /> |
(...skipping 22 matching lines...) Expand all Loading... | |
33 } | 33 } |
34 var embed = createModule('naclModule', 'irt_manifest_file.nmf', mime); | 34 var embed = createModule('naclModule', 'irt_manifest_file.nmf', mime); |
35 embed.basic_tests ='2'; | 35 embed.basic_tests ='2'; |
36 embed.stress_tests = '0'; | 36 embed.stress_tests = '0'; |
37 document.body.appendChild(embed); | 37 document.body.appendChild(embed); |
38 | 38 |
39 function setupTests(tester, plugin) { | 39 function setupTests(tester, plugin) { |
40 tester.addAsyncTest('Test_00_Init', function(status) { | 40 tester.addAsyncTest('Test_00_Init', function(status) { |
41 plugin.addEventListener('message', function(message_event) { | 41 plugin.addEventListener('message', function(message_event) { |
42 this.removeEventListener('message', arguments.callee, false); | 42 this.removeEventListener('message', arguments.callee, false); |
43 var golden = 'File Contents:\nTest File Content'; | 43 var golden = [ |
44 'File Contents:\nTest File Content', | |
45 // 2 is an error code for ENOENT. | |
Mark Seaborn
2014/05/29 16:55:48
Hard-coding a numeric errno value here isn't very
hidehiko
2014/05/30 04:49:58
Done.
| |
46 'open_resource() result: 2', | |
47 'open_resource() result: 2', | |
48 ]; | |
44 status.assertEqual(message_event.data, golden); | 49 status.assertEqual(message_event.data, golden); |
45 status.pass(); | 50 status.pass(); |
46 }, false); | 51 }, false); |
47 plugin.postMessage('hello'); | 52 plugin.postMessage('hello'); |
48 }); | 53 }); |
49 } | 54 } |
50 | 55 |
51 var tester = new Tester(); | 56 var tester = new Tester(); |
52 setupTests(tester, $('naclModule')); | 57 setupTests(tester, $('naclModule')); |
53 tester.waitFor($('naclModule')); | 58 tester.waitFor($('naclModule')); |
54 tester.run(); | 59 tester.run(); |
55 //]]> | 60 //]]> |
56 </script> | 61 </script> |
57 </body> | 62 </body> |
58 </html> | 63 </html> |
OLD | NEW |