| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2010 The Native Client Authors. All rights reserved. | 2 Copyright 2010 The Native Client 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 | 6 |
| 7 <div id="scratch_space"></div> | 7 <div id="scratch_space"></div> |
| 8 | 8 |
| 9 <div id="results"> | 9 <div id="results"> |
| 10 Javascript has failed to load. | 10 Javascript has failed to load. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 } | 53 } |
| 54 window[onload_id] = onload; | 54 window[onload_id] = onload; |
| 55 | 55 |
| 56 // Using createElement() + innerHTML is a very kludgy way of launching | 56 // Using createElement() + innerHTML is a very kludgy way of launching |
| 57 // a process. TODO(mseaborn): Add a better interface for launching | 57 // a process. TODO(mseaborn): Add a better interface for launching |
| 58 // processes to the plugin. | 58 // processes to the plugin. |
| 59 // See http://code.google.com/p/nativeclient/issues/detail?id=746 | 59 // See http://code.google.com/p/nativeclient/issues/detail?id=746 |
| 60 var node = document.createElement('div'); | 60 var node = document.createElement('div'); |
| 61 document.getElementById('scratch_space').appendChild(node); | 61 document.getElementById('scratch_space').appendChild(node); |
| 62 node.innerHTML = '<embed name=foo width=0 height=0 ' + | 62 node.innerHTML = '<embed name=foo width=0 height=0 ' + |
| 63 'type="application/x-nacl-srpc" onload="'+onload_id+'()" />'; | 63 'type="application/x-nacl" onload="'+onload_id+'()" />'; |
| 64 var plugin = node.childNodes[0]; | 64 var plugin = node.childNodes[0]; |
| 65 plugin.src = url; | 65 plugin.src = url; |
| 66 } | 66 } |
| 67 | 67 |
| 68 function runTest(url, callback) { | 68 function runTest(url, callback) { |
| 69 log(url + ': running...'); | 69 log(url + ': running...'); |
| 70 startProcess(url, function(plugin) { | 70 startProcess(url, function(plugin) { |
| 71 log(url + ': process has started...'); | 71 log(url + ': process has started...'); |
| 72 try { | 72 try { |
| 73 var result = plugin.run_tests(); | 73 var result = plugin.run_tests(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } | 111 } |
| 112 | 112 |
| 113 addTest('dynamic_load_test.nexe'); | 113 addTest('dynamic_load_test.nexe'); |
| 114 addTest('dynamic_modify_test.nexe'); | 114 addTest('dynamic_modify_test.nexe'); |
| 115 addTest('imc_shm_mmap_test.nexe'); | 115 addTest('imc_shm_mmap_test.nexe'); |
| 116 } | 116 } |
| 117 | 117 |
| 118 window.onload = runAllTests; | 118 window.onload = runAllTests; |
| 119 | 119 |
| 120 </script> | 120 </script> |
| OLD | NEW |