OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 function moduleDidLoad() { | 5 function moduleDidLoad() { |
6 } | 6 } |
7 | 7 |
8 | 8 |
9 // Add event listeners after the NaCl module has loaded. These listeners will | 9 // Add event listeners after the NaCl module has loaded. These listeners will |
10 // forward messages to the NaCl module via postMessage() | 10 // forward messages to the NaCl module via postMessage() |
(...skipping 18 matching lines...) Expand all Loading... |
29 var result = message_event.data.benchmark.result; | 29 var result = message_event.data.benchmark.result; |
30 var text = '<tr><th>' + name + ': </th><th>' + result + '</th></tr>'; | 30 var text = '<tr><th>' + name + ': </th><th>' + result + '</th></tr>'; |
31 console.log(text); | 31 console.log(text); |
32 var window = document.getElementById('result').contentWindow; | 32 var window = document.getElementById('result').contentWindow; |
33 window.document.writeln(text); | 33 window.document.writeln(text); |
34 } | 34 } |
35 if (message_event.data.message == 'benchmark_finish') { | 35 if (message_event.data.message == 'benchmark_finish') { |
36 common.updateStatus('READY TO RUN'); | 36 common.updateStatus('READY TO RUN'); |
37 var window = document.getElementById('result').contentWindow; | 37 var window = document.getElementById('result').contentWindow; |
38 window.document.writeln('</table>'); | 38 window.document.writeln('</table>'); |
39 window.document.writeln('Finished.<br><br></samp>'); | 39 window.document.writeln('Finished<br><br></samp>'); |
40 } | 40 } |
41 } | 41 } |
OLD | NEW |