OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "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" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 // TODO(satish): Once this flakiness has been fixed, add a second test here to | 99 // TODO(satish): Once this flakiness has been fixed, add a second test here to |
100 // check for sending many clicks in succession to the speech button and verify | 100 // check for sending many clicks in succession to the speech button and verify |
101 // that it doesn't cause any crash but works as expected. This should act as the | 101 // that it doesn't cause any crash but works as expected. This should act as the |
102 // test for http://crbug.com/59173 | 102 // test for http://crbug.com/59173 |
103 // | 103 // |
104 // TODO(satish): Similar to above, once this flakiness has been fixed add | 104 // TODO(satish): Similar to above, once this flakiness has been fixed add |
105 // another test here to check that when speech recognition is in progress and | 105 // another test here to check that when speech recognition is in progress and |
106 // a renderer crashes, we get a call to | 106 // a renderer crashes, we get a call to |
107 // SpeechRecognitionManager::CancelAllRequestsWithDelegate. | 107 // SpeechRecognitionManager::CancelAllRequestsWithDelegate. |
108 IN_PROC_BROWSER_TEST_F(InputTagSpeechBrowserTest, TestBasicRecognition) { | 108 // crbug/360448 |
| 109 IN_PROC_BROWSER_TEST_F(InputTagSpeechBrowserTest, |
| 110 DISABLED_TestBasicRecognition) { |
109 RunSpeechRecognitionTest("basic_recognition.html"); | 111 RunSpeechRecognitionTest("basic_recognition.html"); |
110 EXPECT_TRUE(fake_speech_recognition_manager_.grammar().empty()); | 112 EXPECT_TRUE(fake_speech_recognition_manager_.grammar().empty()); |
111 } | 113 } |
112 | 114 |
113 IN_PROC_BROWSER_TEST_F(InputTagSpeechBrowserTest, GrammarAttribute) { | 115 // crbug/360448 |
| 116 IN_PROC_BROWSER_TEST_F(InputTagSpeechBrowserTest, DISABLED_GrammarAttribute) { |
114 RunSpeechRecognitionTest("grammar_attribute.html"); | 117 RunSpeechRecognitionTest("grammar_attribute.html"); |
115 EXPECT_EQ("http://example.com/grammar.xml", | 118 EXPECT_EQ("http://example.com/grammar.xml", |
116 fake_speech_recognition_manager_.grammar()); | 119 fake_speech_recognition_manager_.grammar()); |
117 } | 120 } |
118 | 121 |
119 // Flaky on Linux, Windows and Mac http://crbug.com/140765. | 122 // Flaky on Linux, Windows and Mac http://crbug.com/140765. |
120 IN_PROC_BROWSER_TEST_F(InputTagSpeechBrowserTest, DISABLED_TestCancelAll) { | 123 IN_PROC_BROWSER_TEST_F(InputTagSpeechBrowserTest, DISABLED_TestCancelAll) { |
121 // The test checks that the cancel-all callback gets issued when a session | 124 // The test checks that the cancel-all callback gets issued when a session |
122 // is pending, so don't send a fake response. | 125 // is pending, so don't send a fake response. |
123 // We are not expecting a navigation event being raised from the JS of the | 126 // We are not expecting a navigation event being raised from the JS of the |
124 // test page JavaScript in this case. | 127 // test page JavaScript in this case. |
125 fake_speech_recognition_manager_.set_should_send_fake_response(false); | 128 fake_speech_recognition_manager_.set_should_send_fake_response(false); |
126 | 129 |
127 LoadAndStartSpeechRecognitionTest("basic_recognition.html"); | 130 LoadAndStartSpeechRecognitionTest("basic_recognition.html"); |
128 | 131 |
129 // Make the renderer crash. This should trigger | 132 // Make the renderer crash. This should trigger |
130 // InputTagSpeechDispatcherHost to cancel all pending sessions. | 133 // InputTagSpeechDispatcherHost to cancel all pending sessions. |
131 NavigateToURL(shell(), GURL(kChromeUICrashURL)); | 134 NavigateToURL(shell(), GURL(kChromeUICrashURL)); |
132 | 135 |
133 EXPECT_TRUE(fake_speech_recognition_manager_.did_cancel_all()); | 136 EXPECT_TRUE(fake_speech_recognition_manager_.did_cancel_all()); |
134 } | 137 } |
135 | 138 |
136 } // namespace content | 139 } // namespace content |
OLD | NEW |