OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/test/base/in_process_browser_test.h" | 12 #include "chrome/test/base/in_process_browser_test.h" |
13 #include "chrome/test/base/ui_test_utils.h" | 13 #include "chrome/test/base/ui_test_utils.h" |
14 #include "content/browser/renderer_host/render_view_host_impl.h" | 14 #include "content/browser/renderer_host/render_view_host_impl.h" |
15 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" | 15 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" |
16 #include "content/browser/speech/speech_recognition_manager_impl.h" | 16 #include "content/browser/speech/speech_recognition_manager_impl.h" |
17 #include "content/browser/tab_contents/tab_contents.h" | 17 #include "content/browser/tab_contents/tab_contents.h" |
18 #include "content/public/browser/notification_types.h" | 18 #include "content/public/browser/notification_types.h" |
19 #include "content/public/common/content_switches.h" | 19 #include "content/public/common/content_switches.h" |
| 20 #include "content/public/common/speech_recognition_error.h" |
20 #include "content/public/common/speech_recognition_result.h" | 21 #include "content/public/common/speech_recognition_result.h" |
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
22 | 23 |
23 using content::NavigationController; | 24 using content::NavigationController; |
24 using content::WebContents; | 25 using content::WebContents; |
25 | 26 |
26 namespace speech { | 27 namespace speech { |
27 class FakeSpeechRecognitionManager; | 28 class FakeSpeechRecognitionManager; |
28 } | 29 } |
29 | 30 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 246 |
246 // Make the renderer crash. This should trigger | 247 // Make the renderer crash. This should trigger |
247 // InputTagSpeechDispatcherHost to cancel all pending sessions. | 248 // InputTagSpeechDispatcherHost to cancel all pending sessions. |
248 GURL test_url("about:crash"); | 249 GURL test_url("about:crash"); |
249 ui_test_utils::NavigateToURL(browser(), test_url); | 250 ui_test_utils::NavigateToURL(browser(), test_url); |
250 | 251 |
251 EXPECT_TRUE(fake_speech_recognition_manager_.did_cancel_all()); | 252 EXPECT_TRUE(fake_speech_recognition_manager_.did_cancel_all()); |
252 } | 253 } |
253 | 254 |
254 } // namespace speech | 255 } // namespace speech |
OLD | NEW |