| OLD | NEW |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 <html> | 3 <html> |
| 4 <!-- | 4 <!-- |
| 5 Copyright 2011 The Native Client Authors. All rights reserved. | 5 Copyright 2011 The Native Client Authors. All rights reserved. |
| 6 Use of this source code is governed by a BSD-style license that can | 6 Use of this source code is governed by a BSD-style license that can |
| 7 be found in the LICENSE file. | 7 be found in the LICENSE file. |
| 8 --> | 8 --> |
| 9 <head> | 9 <head> |
| 10 <title>PPAPI Runtime Feature Test</title> | 10 <title>PPAPI Runtime Feature Test</title> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 'arm': './ppapi_test_example_arm.nexe', | 38 'arm': './ppapi_test_example_arm.nexe', |
| 39 }; | 39 }; |
| 40 var lib_names = { | 40 var lib_names = { |
| 41 'x86-32': 'lib', | 41 'x86-32': 'lib', |
| 42 'x86-64': 'lib', | 42 'x86-64': 'lib', |
| 43 'arm': 'lib', | 43 'arm': 'lib', |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 var onMessage = function(message) { | 46 var onMessage = function(message) { |
| 47 log('Received message: ' + message.data); | 47 log('Received message: ' + message.data); |
| 48 if (message.data == 'TestSimpleAsync:PASSED') { | 48 if (message.data == 'TestSimple:PASSED') { |
| 49 rpc.pass('test'); | 49 rpc.pass('test'); |
| 50 } else { | 50 } else { |
| 51 rpc.fail('test', 'Unexpected reply'); | 51 rpc.fail('test', 'Unexpected reply'); |
| 52 } | 52 } |
| 53 rpc.shutdown(); | 53 rpc.shutdown(); |
| 54 }; | 54 }; |
| 55 plugin.addEventListener('message', onMessage, false); | 55 plugin.addEventListener('message', onMessage, false); |
| 56 | 56 |
| 57 var onPluginStart = function() { | 57 var onPluginStart = function() { |
| 58 log('started OK'); | 58 log('started OK'); |
| 59 plugin.postMessage('TestSimpleAsync'); | 59 plugin.postMessage('TestSimple'); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 // TODO(bradchen): Rewrite this test. | 62 // TODO(bradchen): Rewrite this test. |
| 63 // This entire test will be rewritten when the new nexe loading | 63 // This entire test will be rewritten when the new nexe loading |
| 64 // support is available. In the mean time we wait. | 64 // support is available. In the mean time we wait. |
| 65 var sleepTime = 500; // in milliseconds for setTimeout | 65 var sleepTime = 500; // in milliseconds for setTimeout |
| 66 var maxTries = 100; // give up after 100 tries == 50 seconds | 66 var maxTries = 100; // give up after 100 tries == 50 seconds |
| 67 var whenPluginReady = function () { | 67 var whenPluginReady = function () { |
| 68 log('in whenPluginReady'); | 68 log('in whenPluginReady'); |
| 69 if (maxTries == 0) { | 69 if (maxTries == 0) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 87 //]]> | 87 //]]> |
| 88 </script> | 88 </script> |
| 89 | 89 |
| 90 <embed id="naclDSOModule" | 90 <embed id="naclDSOModule" |
| 91 name="naclDSOModule" | 91 name="naclDSOModule" |
| 92 type="application/x-nacl" | 92 type="application/x-nacl" |
| 93 width=0 height=0 /> | 93 width=0 height=0 /> |
| 94 | 94 |
| 95 </body> | 95 </body> |
| 96 </html> | 96 </html> |
| OLD | NEW |