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

Side by Side Diff: chrome/test/data/extensions/api_test/speech_input/start_stop/test.js

Issue 11745015: Update references to the extension messaging APIs to point to the "runtime" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 months 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Extension Speech Input api test. 5 // Extension Speech Input api test.
6 // browser_tests --gtest_filter="ExtensionSpeechInputApiTest.*" 6 // browser_tests --gtest_filter="ExtensionSpeechInputApiTest.*"
7 7
8 chrome.test.runTests([ 8 chrome.test.runTests([
9 function testSpeechInputStartStop() { 9 function testSpeechInputStartStop() {
10 var count = 0; 10 var count = 0;
(...skipping 26 matching lines...) Expand all
37 chrome.experimental.speechInput.start({}, started); 37 chrome.experimental.speechInput.start({}, started);
38 else 38 else
39 chrome.test.succeed(); 39 chrome.test.succeed();
40 }); 40 });
41 } 41 }
42 }, 42 },
43 43
44 function testSpeechInputInvalidOperation() { 44 function testSpeechInputInvalidOperation() {
45 // Calling start once recording should generate an invalid operation error. 45 // Calling start once recording should generate an invalid operation error.
46 chrome.experimental.speechInput.stop(function() { 46 chrome.experimental.speechInput.stop(function() {
47 chrome.test.assertEq(chrome.extension.lastError.message, 47 chrome.test.assertEq(chrome.runtime.lastError.message,
48 "invalidOperation"); 48 "invalidOperation");
49 chrome.experimental.speechInput.start({}, started); 49 chrome.experimental.speechInput.start({}, started);
50 }); 50 });
51 51
52 // Calling stop before recording should generate an invalid operation error. 52 // Calling stop before recording should generate an invalid operation error.
53 function started() { 53 function started() {
54 chrome.test.assertNoLastError(); 54 chrome.test.assertNoLastError();
55 chrome.experimental.speechInput.start({}, function() { 55 chrome.experimental.speechInput.start({}, function() {
56 chrome.test.assertEq(chrome.extension.lastError.message, 56 chrome.test.assertEq(chrome.runtime.lastError.message,
57 "invalidOperation"); 57 "invalidOperation");
58 chrome.test.succeed(); 58 chrome.test.succeed();
59 }); 59 });
60 } 60 }
61 } 61 }
62 ]); 62 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698