| 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" /> |
| 11 <meta http-equiv="Expires" content="-1" /> | 11 <meta http-equiv="Expires" content="-1" /> |
| 12 <script type="text/javascript" src="nacltest.js"></script> | 12 <script type="text/javascript" src="nacltest.js"></script> |
| 13 <title>Native Client Open Resource Before PPAPI Test</title> | 13 <title>Native Client failing Open Resource Before PPAPI Test</title> |
| 14 </head> | 14 </head> |
| 15 | 15 |
| 16 <body> | 16 <body> |
| 17 <h1>Native Client Open Resource Before PPAPI Test</h1> | 17 <h1>Native Client failing Open Resource Before PPAPI Test</h1> |
| 18 | 18 |
| 19 <script type="text/javascript"> | 19 <script type="text/javascript"> |
| 20 //<![CDATA[ | 20 //<![CDATA[ |
| 21 function createModule(id, src, type) { | 21 function createModule(id, src, type) { |
| 22 return createNaClEmbed({ | 22 return createNaClEmbed({ |
| 23 id: id, | 23 id: id, |
| 24 src: src, | 24 src: src, |
| 25 width: 400, | 25 width: 400, |
| 26 height: 400, | 26 height: 400, |
| 27 type: type | 27 type: type |
| 28 }); | 28 }); |
| 29 } | 29 } |
| 30 var mime = 'application/x-nacl'; | 30 var mime = 'application/x-nacl'; |
| 31 if (getTestArguments()['pnacl'] !== undefined) { | 31 if (getTestArguments()['pnacl'] !== undefined) { |
| 32 mime = 'application/x-pnacl'; | 32 mime = 'application/x-pnacl'; |
| 33 } | 33 } |
| 34 var embed = createModule('naclModule', 'irt_manifest_file.nmf', mime); | 34 var embed = createModule('naclModule', 'irt_manifest_file_fail.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 status.assertEqual(message_event.data, 2); // ENOENT should be returned. |
| 44 status.assertEqual(message_event.data, golden); | |
| 45 status.pass(); | 44 status.pass(); |
| 46 }, false); | 45 }, false); |
| 47 plugin.postMessage('hello'); | 46 plugin.postMessage('hello'); |
| 48 }); | 47 }); |
| 49 } | 48 } |
| 50 | 49 |
| 51 var tester = new Tester(); | 50 var tester = new Tester(); |
| 52 setupTests(tester, $('naclModule')); | 51 setupTests(tester, $('naclModule')); |
| 53 tester.waitFor($('naclModule')); | 52 tester.waitFor($('naclModule')); |
| 54 tester.run(); | 53 tester.run(); |
| 55 //]]> | 54 //]]> |
| 56 </script> | 55 </script> |
| 57 </body> | 56 </body> |
| 58 </html> | 57 </html> |
| OLD | NEW |