| 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 be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 var voiceArray; | 7 var voiceArray; |
| 8 var trials = 3; | 8 var trials = 3; |
| 9 var resultMap = {}; | 9 var resultMap = {}; |
| 10 var updateDependencyFunctions = []; | 10 var updateDependencyFunctions = []; |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 } | 670 } |
| 671 opt.setAttribute('value', name); | 671 opt.setAttribute('value', name); |
| 672 opt.innerText = voiceArray[i].voiceName; | 672 opt.innerText = voiceArray[i].voiceName; |
| 673 $('voices').appendChild(opt); | 673 $('voices').appendChild(opt); |
| 674 } | 674 } |
| 675 }); | 675 }); |
| 676 $('voices').addEventListener('change', function() { | 676 $('voices').addEventListener('change', function() { |
| 677 var i = $('voices').selectedIndex; | 677 var i = $('voices').selectedIndex; |
| 678 localStorage['voice'] = $('voices').item(i).value; | 678 localStorage['voice'] = $('voices').item(i).value; |
| 679 }, false); | 679 }, false); |
| 680 $('stop').addEventListener('click', stop); |
| 680 | 681 |
| 681 for (var i = 0; i < tests.length; i++) { | 682 for (var i = 0; i < tests.length; i++) { |
| 682 registerTest(tests[i]); | 683 registerTest(tests[i]); |
| 683 } | 684 } |
| 684 updateDependencies(); | 685 updateDependencies(); |
| 685 } | 686 } |
| 686 | 687 |
| 687 function stop() { | 688 function stop() { |
| 688 console.log('*** Emergency stop!'); | 689 console.log('*** Emergency stop!'); |
| 689 emergencyStop = true; | 690 emergencyStop = true; |
| 690 chrome.tts.stop(); | 691 chrome.tts.stop(); |
| 691 } | 692 } |
| 693 |
| 694 document.addEventListener('DOMContentLoaded', load); |
| OLD | NEW |