Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: chrome/common/extensions/docs/examples/extensions/ttsdebug/ttsdebug.js

Issue 8318001: Adding `content_security_policy` to a few sample extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Docs. Zips. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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);
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/examples/extensions/ttsdebug/ttsdebug.html ('k') | chrome/common/extensions/docs/samples.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698