| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 Copyright (c) 2011 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 Exit Status Test</title> | 13 <title>Native Client Exit Status Test</title> |
| 14 </head> | 14 </head> |
| 15 | 15 |
| 16 <body> | 16 <body> |
| 17 <h1>Native Client Exit Status Test</h1> | 17 <h1>Native Client Exit Status Test</h1> |
| 18 <div> | |
| 19 <embed id="naclModule" | |
| 20 name="naclModule" | |
| 21 width=400 height=400 | |
| 22 src="pm_exit_status_test.nmf" | |
| 23 basic_tests="2" | |
| 24 stress_tests="0" | |
| 25 style="background-color:gray" | |
| 26 type="application/x-nacl" /> | |
| 27 </div> | |
| 28 | 18 |
| 29 <script type="text/javascript"> | 19 <script type="text/javascript"> |
| 30 //<![CDATA[ | 20 //<![CDATA[ |
| 21 function createModule(id, src, type) { |
| 22 return createNaClEmbed({ |
| 23 id: id, |
| 24 src: src, |
| 25 width: 400, |
| 26 height: 400, |
| 27 type: type |
| 28 }); |
| 29 } |
| 30 |
| 31 var mime = "application/x-nacl"; |
| 32 if (getTestArguments()["pnacl"] !== undefined) { |
| 33 mime = "application/x-pnacl"; |
| 34 } |
| 35 var embed = createModule("naclModule", "pm_exit_status_test.nmf", mime); |
| 36 embed.basic_tests = "2"; |
| 37 embed.stress_tests = "0"; |
| 38 document.body.appendChild(embed); |
| 39 |
| 31 var tester = new Tester($('body')); | 40 var tester = new Tester($('body')); |
| 32 var args = getTestArguments({'expected_exit' : | 41 var args = getTestArguments({'expected_exit' : |
| 33 'THIS TEST CANNOT RUN STANDALONE -- run using scons instead'}); | 42 'THIS TEST CANNOT RUN STANDALONE -- run using scons instead'}); |
| 34 | 43 |
| 35 function setupTests(tester, plugin) { | 44 function setupTests(tester, plugin) { |
| 36 tester.addAsyncTest('StartTest', function(status) { | 45 tester.addAsyncTest('StartTest', function(status) { |
| 37 plugin.addEventListener('message', status.wrap(function(message_event) { | 46 plugin.addEventListener('message', status.wrap(function(message_event) { |
| 38 this.removeEventListener('message', arguments.callee, false); | 47 this.removeEventListener('message', arguments.callee, false); |
| 39 status.assertEqual(message_event.data, | 48 status.assertEqual(message_event.data, |
| 40 'hello world'); | 49 'hello world'); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 55 | 64 |
| 56 var tester = new Tester(); | 65 var tester = new Tester(); |
| 57 setupTests(tester, $('naclModule')); | 66 setupTests(tester, $('naclModule')); |
| 58 tester.waitFor($('naclModule')); | 67 tester.waitFor($('naclModule')); |
| 59 tester.run(); | 68 tester.run(); |
| 60 // otherwise trivially passes | 69 // otherwise trivially passes |
| 61 //]]> | 70 //]]> |
| 62 </script> | 71 </script> |
| 63 </body> | 72 </body> |
| 64 </html> | 73 </html> |
| OLD | NEW |