OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "content/public/test/fake_speech_recognition_manager.h" | 5 #include "content/public/test/fake_speech_recognition_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/public/browser/speech_recognition_event_listener.h" | 10 #include "content/public/browser/speech_recognition_event_listener.h" |
11 #include "content/public/common/speech_recognition_result.h" | 11 #include "content/public/common/speech_recognition_result.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 const char kTestResult[] = "Pictures of the moon"; | 15 const char kTestResult[] = "Pictures of the moon"; |
16 } // namespace | 16 } // namespace |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 SpeechRecognitionResults results; | 134 SpeechRecognitionResults results; |
135 results.push_back(result); | 135 results.push_back(result); |
136 listener_->OnRecognitionResults(session_id_, results); | 136 listener_->OnRecognitionResults(session_id_, results); |
137 listener_->OnRecognitionEnd(session_id_); | 137 listener_->OnRecognitionEnd(session_id_); |
138 session_id_ = 0; | 138 session_id_ = 0; |
139 listener_ = NULL; | 139 listener_ = NULL; |
140 VLOG(1) << "Finished setting fake recognition result."; | 140 VLOG(1) << "Finished setting fake recognition result."; |
141 } | 141 } |
142 | 142 |
143 } // namespace content | 143 } // namespace content |
OLD | NEW |