| 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/location.h" |    8 #include "base/location.h" | 
|    9 #include "base/single_thread_task_runner.h" |    9 #include "base/single_thread_task_runner.h" | 
|   10 #include "base/strings/utf_string_conversions.h" |   10 #include "base/strings/utf_string_conversions.h" | 
|   11 #include "base/thread_task_runner_handle.h" |   11 #include "base/threading/thread_task_runner_handle.h" | 
|   12 #include "content/public/browser/speech_recognition_event_listener.h" |   12 #include "content/public/browser/speech_recognition_event_listener.h" | 
|   13 #include "content/public/browser/speech_recognition_manager_delegate.h" |   13 #include "content/public/browser/speech_recognition_manager_delegate.h" | 
|   14 #include "content/public/common/speech_recognition_result.h" |   14 #include "content/public/common/speech_recognition_result.h" | 
|   15 #include "content/public/test/test_utils.h" |   15 #include "content/public/test/test_utils.h" | 
|   16 #include "testing/gtest/include/gtest/gtest.h" |   16 #include "testing/gtest/include/gtest/gtest.h" | 
|   17  |   17  | 
|   18 namespace { |   18 namespace { | 
|   19 const char kTestResult[] = "Pictures of the moon"; |   19 const char kTestResult[] = "Pictures of the moon"; | 
|   20  |   20  | 
|   21 void RunCallback(const base::Closure recognition_started_closure) { |   21 void RunCallback(const base::Closure recognition_started_closure) { | 
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  164   SpeechRecognitionResults results; |  164   SpeechRecognitionResults results; | 
|  165   results.push_back(result); |  165   results.push_back(result); | 
|  166   listener_->OnRecognitionResults(session_id_, results); |  166   listener_->OnRecognitionResults(session_id_, results); | 
|  167   listener_->OnRecognitionEnd(session_id_); |  167   listener_->OnRecognitionEnd(session_id_); | 
|  168   session_id_ = 0; |  168   session_id_ = 0; | 
|  169   listener_ = NULL; |  169   listener_ = NULL; | 
|  170   VLOG(1) << "Finished setting fake recognition result."; |  170   VLOG(1) << "Finished setting fake recognition result."; | 
|  171 } |  171 } | 
|  172  |  172  | 
|  173 }  // namespace content |  173 }  // namespace content | 
| OLD | NEW |