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

Side by Side Diff: chrome/browser/ui/app_list/speech_recognizer_browsertest.cc

Issue 809603003: Plumb preamble log data from the hotword extension into the speech recognizer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build. Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/ui/app_list/speech_recognizer.h" 5 #include "chrome/browser/ui/app_list/speech_recognizer.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 SpeechRecognizer recognizer(mock_speech_delegate_->GetWeakPtr(), 82 SpeechRecognizer recognizer(mock_speech_delegate_->GetWeakPtr(),
83 browser()->profile()->GetRequestContext(), 83 browser()->profile()->GetRequestContext(),
84 "en"); 84 "en");
85 85
86 base::RunLoop run_loop; 86 base::RunLoop run_loop;
87 EXPECT_CALL(*mock_speech_delegate_, 87 EXPECT_CALL(*mock_speech_delegate_,
88 OnSpeechResult(base::ASCIIToUTF16("Pictures of the moon"), true)); 88 OnSpeechResult(base::ASCIIToUTF16("Pictures of the moon"), true));
89 EXPECT_CALL(*mock_speech_delegate_, 89 EXPECT_CALL(*mock_speech_delegate_,
90 OnSpeechRecognitionStateChanged(SPEECH_RECOGNITION_READY)) 90 OnSpeechRecognitionStateChanged(SPEECH_RECOGNITION_READY))
91 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); 91 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit));
92 recognizer.Start(); 92 recognizer.Start(nullptr);
93 run_loop.Run(); 93 run_loop.Run();
94 } 94 }
95 95
96 } // namespace app_list 96 } // namespace app_list
97 97
98 98
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/speech_recognizer.cc ('k') | chrome/browser/ui/app_list/start_page_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698