| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/macros.h" |
| 5 #include "base/strings/utf_string_conversions.h" | 6 #include "base/strings/utf_string_conversions.h" |
| 6 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" | 7 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" |
| 7 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/browser/ui/browser_commands.h" | 9 #include "chrome/browser/ui/browser_commands.h" |
| 9 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 10 #include "chrome/test/base/in_process_browser_test.h" | 11 #include "chrome/test/base/in_process_browser_test.h" |
| 11 #include "chrome/test/base/ui_test_utils.h" | 12 #include "chrome/test/base/ui_test_utils.h" |
| 12 #include "content/public/browser/web_contents_observer.h" | 13 #include "content/public/browser/web_contents_observer.h" |
| 13 #include "content/public/test/browser_test_utils.h" | 14 #include "content/public/test/browser_test_utils.h" |
| 14 #include "content/public/test/fake_speech_recognition_manager.h" | 15 #include "content/public/test/fake_speech_recognition_manager.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 web_contents, kRetriveTranscriptScript, &output)); | 139 web_contents, kRetriveTranscriptScript, &output)); |
| 139 EXPECT_EQ(kExpectedTranscript, output); | 140 EXPECT_EQ(kExpectedTranscript, output); |
| 140 } | 141 } |
| 141 | 142 |
| 142 // Close the tab to so that we see WCO::WebContentsDestroyed(). | 143 // Close the tab to so that we see WCO::WebContentsDestroyed(). |
| 143 chrome::CloseTab(browser()); | 144 chrome::CloseTab(browser()); |
| 144 EXPECT_TRUE(speech_contents_observer.web_contents_destroyed()); | 145 EXPECT_TRUE(speech_contents_observer.web_contents_destroyed()); |
| 145 } | 146 } |
| 146 | 147 |
| 147 } // namespace speech | 148 } // namespace speech |
| OLD | NEW |