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

Side by Side Diff: chrome/browser/ui/webui/app_list/start_page_browsertest.js

Issue 966983003: Delete all uses of SpeechManager from the app list start page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove tests. Created 5 years, 9 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
« no previous file with comments | « chrome/browser/resources/app_list/start_page.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 /** 5 /**
6 * TestFixture for kiosk app settings WebUI testing. 6 * TestFixture for kiosk app settings WebUI testing.
7 * @extends {testing.Test} 7 * @extends {testing.Test}
8 * @constructor 8 * @constructor
9 */ 9 */
10 function AppListStartPageWebUITest() {} 10 function AppListStartPageWebUITest() {}
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 assertNotEquals(null, $('doodle')); 152 assertNotEquals(null, $('doodle'));
153 assertEquals('http://example.com/x/doodle.png', $('doodle_image').src); 153 assertEquals('http://example.com/x/doodle.png', $('doodle_image').src);
154 assertEquals('', $('doodle_image').title); 154 assertEquals('', $('doodle_image').title);
155 assertEquals(null, $('doodle_link')); 155 assertEquals(null, $('doodle_link'));
156 156
157 157
158 appList.startPage.onAppListDoodleUpdated({}, 158 appList.startPage.onAppListDoodleUpdated({},
159 'http://example.com/'); 159 'http://example.com/');
160 assertEquals(null, $('doodle')); 160 assertEquals(null, $('doodle'));
161 }); 161 });
162
163 TEST_F('AppListStartPageWebUITest', 'SpeechRecognitionState', function() {
164 this.mockHandler.expects(once()).setSpeechRecognitionState('READY');
165 appList.startPage.onAppListShown(false, true);
166 this.mockHandler.expects(once()).setSpeechRecognitionState('RECOGNIZING');
167 appList.startPage.toggleSpeechRecognition();
168 Mock4JS.verifyAllMocks();
169 Mock4JS.clearMocksToVerify();
170
171 this.mockHandler.expects(once()).setSpeechRecognitionState('READY');
172 for (var i = 0; i < this.audioTrackMocks.length; ++i) {
173 this.audioTrackMocks[i].expects(once()).stop();
174 }
175 appList.startPage.toggleSpeechRecognition();
176 Mock4JS.verifyAllMocks();
177 Mock4JS.clearMocksToVerify();
178
179 this.mockHandler.expects(once()).setSpeechRecognitionState('RECOGNIZING');
180 appList.startPage.toggleSpeechRecognition();
181 Mock4JS.verifyAllMocks();
182 Mock4JS.clearMocksToVerify();
183
184 this.mockHandler.expects(once()).setSpeechRecognitionState('STOPPING');
185 this.mockHandler.expects(once()).setSpeechRecognitionState('READY');
186 for (var i = 0; i < this.audioTrackMocks.length; ++i) {
187 this.audioTrackMocks[i].expects(once()).stop();
188 }
189 appList.startPage.onAppListHidden();
190 });
191
192 TEST_F('AppListStartPageWebUITest', 'SpeechRecognition', function() {
193 this.mockHandler.expects(once()).setSpeechRecognitionState('READY');
194 appList.startPage.onAppListShown(false, true);
195 this.mockHandler.expects(once()).setSpeechRecognitionState('RECOGNIZING');
196 appList.startPage.toggleSpeechRecognition();
197 Mock4JS.verifyAllMocks();
198 Mock4JS.clearMocksToVerify();
199
200 this.mockHandler.expects(once()).setSpeechRecognitionState('IN_SPEECH');
201 this.speechRecognizer.onspeechstart();
202 Mock4JS.verifyAllMocks();
203 Mock4JS.clearMocksToVerify();
204
205 this.mockHandler.expects(once()).speechResult('test,false');
206 this.sendSpeechResult('test', false);
207 Mock4JS.verifyAllMocks();
208 Mock4JS.clearMocksToVerify();
209
210 this.mockHandler.expects(once()).speechResult('test,true');
211 this.mockHandler.expects(once()).setSpeechRecognitionState('READY');
212 for (var i = 0; i < this.audioTrackMocks.length; ++i) {
213 this.audioTrackMocks[i].expects(once()).stop();
214 }
215 this.sendSpeechResult('test', true);
216 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/app_list/start_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698