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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "content/browser/renderer_host/render_view_host_impl.h" | 11 #include "content/browser/renderer_host/render_view_host_impl.h" |
12 #include "content/browser/web_contents/web_contents_impl.h" | 12 #include "content/browser/web_contents/web_contents_impl.h" |
13 #include "content/public/browser/notification_types.h" | 13 #include "content/public/browser/notification_types.h" |
14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
15 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
16 #include "content/public/common/speech_recognition_error.h" | 16 #include "content/public/common/speech_recognition_error.h" |
17 #include "content/public/common/speech_recognition_result.h" | 17 #include "content/public/common/speech_recognition_result.h" |
18 #include "content/public/common/url_constants.h" | 18 #include "content/public/common/url_constants.h" |
19 #include "content/public/test/fake_speech_recognition_manager.h" | 19 #include "content/public/test/fake_speech_recognition_manager.h" |
20 #include "content/public/test/test_utils.h" | 20 #include "content/public/test/test_utils.h" |
21 #include "content/shell/shell.h" | 21 #include "content/shell/browser/shell.h" |
22 #include "content/test/content_browser_test.h" | 22 #include "content/test/content_browser_test.h" |
23 #include "content/test/content_browser_test_utils.h" | 23 #include "content/test/content_browser_test_utils.h" |
24 #include "third_party/WebKit/public/web/WebInputEvent.h" | 24 #include "third_party/WebKit/public/web/WebInputEvent.h" |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 | 27 |
28 class SpeechRecognitionBrowserTest : public ContentBrowserTest { | 28 class SpeechRecognitionBrowserTest : public ContentBrowserTest { |
29 public: | 29 public: |
30 // ContentBrowserTest methods | 30 // ContentBrowserTest methods |
31 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 31 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 LoadAndStartSpeechRecognitionTest("basic_recognition.html"); | 127 LoadAndStartSpeechRecognitionTest("basic_recognition.html"); |
128 | 128 |
129 // Make the renderer crash. This should trigger | 129 // Make the renderer crash. This should trigger |
130 // InputTagSpeechDispatcherHost to cancel all pending sessions. | 130 // InputTagSpeechDispatcherHost to cancel all pending sessions. |
131 NavigateToURL(shell(), GURL(kChromeUICrashURL)); | 131 NavigateToURL(shell(), GURL(kChromeUICrashURL)); |
132 | 132 |
133 EXPECT_TRUE(fake_speech_recognition_manager_.did_cancel_all()); | 133 EXPECT_TRUE(fake_speech_recognition_manager_.did_cancel_all()); |
134 } | 134 } |
135 | 135 |
136 } // namespace content | 136 } // namespace content |
OLD | NEW |