|
|
Created:
6 years, 10 months ago by Jun Mukai Modified:
6 years, 10 months ago Reviewers:
xiyuan CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionAdds speech recognition test case to AppListStartPageWebUITest.
BUG=341926
R=xiyuan@chromium.org
TEST=browser_tests
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251360
Patch Set 1 #
Total comments: 7
Patch Set 2 : fix #Patch Set 3 : fix #
Messages
Total messages: 23 (0 generated)
https://codereview.chromium.org/159973004/diff/1/chrome/browser/ui/webui/app_... File chrome/browser/ui/webui/app_list/start_page_browsertest.js (right): https://codereview.chromium.org/159973004/diff/1/chrome/browser/ui/webui/app_... chrome/browser/ui/webui/app_list/start_page_browsertest.js:68: var transcript = [{transcript: result}]; You probably don't need the enclosing [] and can combine this with the next line: var transcript = { 'transcript': result, 'isFinal': isFinal }; https://codereview.chromium.org/159973004/diff/1/chrome/browser/ui/webui/app_... chrome/browser/ui/webui/app_list/start_page_browsertest.js:119: 'setSpeechRecognitionState', 'speechResult']); nit: Reformat to one string per line. https://codereview.chromium.org/159973004/diff/1/chrome/browser/ui/webui/app_... chrome/browser/ui/webui/app_list/start_page_browsertest.js:155: appList.startPage.toggleSpeechRecognition(); Think you need to Mock4JS.verifyAllMocks(); Mock4JS.clearMocksToVerify(); after this call to verify and clear the mock before continuing with the next case. Or split each expects() into its own test case.
https://codereview.chromium.org/159973004/diff/1/chrome/browser/ui/webui/app_... File chrome/browser/ui/webui/app_list/start_page_browsertest.js (right): https://codereview.chromium.org/159973004/diff/1/chrome/browser/ui/webui/app_... chrome/browser/ui/webui/app_list/start_page_browsertest.js:68: var transcript = [{transcript: result}]; On 2014/02/13 01:56:17, xiyuan wrote: > You probably don't need the enclosing [] and can combine this with the next > line: > > var transcript = { > 'transcript': result, > 'isFinal': isFinal > }; the speech result data is a bit tricky, but isFinal and transcript isn't in the same level actually... https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-event SpeechRecognitionEvent holds a list of SpeechRecognitionResult objects - each SpeechRecognitionResult object has 'isFinal' field - each SpeechRecognitionResult object has a list of SpeechRecognitionAlternative - each SpeechRecognitionAlternative object has 'transcript' and 'confidence' (my code just ignores confidence though) So, this is actually correct, 'results' is a list of results and each result consists of a list of alternatives. Updated variable names slightly since 'transcript' is just wrong and misleading. https://codereview.chromium.org/159973004/diff/1/chrome/browser/ui/webui/app_... chrome/browser/ui/webui/app_list/start_page_browsertest.js:119: 'setSpeechRecognitionState', 'speechResult']); On 2014/02/13 01:56:17, xiyuan wrote: > nit: Reformat to one string per line. Done. https://codereview.chromium.org/159973004/diff/1/chrome/browser/ui/webui/app_... chrome/browser/ui/webui/app_list/start_page_browsertest.js:155: appList.startPage.toggleSpeechRecognition(); On 2014/02/13 01:56:17, xiyuan wrote: > Think you need to > > Mock4JS.verifyAllMocks(); > Mock4JS.clearMocksToVerify(); > > after this call to verify and clear the mock before continuing with the next > case. > > Or split each expects() into its own test case. Done.
lgtm https://codereview.chromium.org/159973004/diff/1/chrome/browser/ui/webui/app_... File chrome/browser/ui/webui/app_list/start_page_browsertest.js (right): https://codereview.chromium.org/159973004/diff/1/chrome/browser/ui/webui/app_... chrome/browser/ui/webui/app_list/start_page_browsertest.js:68: var transcript = [{transcript: result}]; On 2014/02/13 02:15:25, Jun Mukai wrote: > On 2014/02/13 01:56:17, xiyuan wrote: > > You probably don't need the enclosing [] and can combine this with the next > > line: > > > > var transcript = { > > 'transcript': result, > > 'isFinal': isFinal > > }; > > the speech result data is a bit tricky, but isFinal and transcript isn't in the > same level actually... > https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-event > SpeechRecognitionEvent holds a list of SpeechRecognitionResult objects > - each SpeechRecognitionResult object has 'isFinal' field > - each SpeechRecognitionResult object has a list of SpeechRecognitionAlternative > - each SpeechRecognitionAlternative object has 'transcript' and 'confidence' > (my code just ignores confidence though) > > So, this is actually correct, 'results' is a list of results and each result > consists of a list of alternatives. > Updated variable names slightly since 'transcript' is just wrong and misleading. Thanks for the explanation.
The CQ bit was checked by mukai@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/159973004/100001
The CQ bit was unchecked by commit-bot@chromium.org
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&nu...
The CQ bit was checked by mukai@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/159973004/460001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel
The CQ bit was checked by mukai@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/159973004/460001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel
The CQ bit was checked by mukai@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/159973004/460001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel
The CQ bit was checked by mukai@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mukai@chromium.org/159973004/460001
Message was sent while issue was closed.
Change committed as 251360 |