OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "chrome/browser/browser_thread.h" | 6 #include "chrome/browser/browser_thread.h" |
7 #include "chrome/browser/speech/speech_input_bubble_controller.h" | 7 #include "chrome/browser/speech/speech_input_bubble_controller.h" |
| 8 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/test/browser_with_test_window_test.h" | 9 #include "chrome/test/browser_with_test_window_test.h" |
9 #include "chrome/test/testing_profile.h" | 10 #include "chrome/test/testing_profile.h" |
10 #include "gfx/rect.h" | 11 #include "gfx/rect.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
12 | 13 |
13 class SkBitmap; | 14 class SkBitmap; |
14 | 15 |
15 namespace speech_input { | 16 namespace speech_input { |
16 | 17 |
17 // A mock bubble class which fakes a focus change or recognition cancel by the | 18 // A mock bubble class which fakes a focus change or recognition cancel by the |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 206 |
206 controller_->CreateBubble(kBubbleCallerId, 1, 1, gfx::Rect(1, 1)); | 207 controller_->CreateBubble(kBubbleCallerId, 1, 1, gfx::Rect(1, 1)); |
207 MessageLoop::current()->Run(); | 208 MessageLoop::current()->Run(); |
208 EXPECT_FALSE(cancel_clicked_); | 209 EXPECT_FALSE(cancel_clicked_); |
209 EXPECT_TRUE(try_again_clicked_); | 210 EXPECT_TRUE(try_again_clicked_); |
210 EXPECT_FALSE(focus_changed_); | 211 EXPECT_FALSE(focus_changed_); |
211 controller_->CloseBubble(kBubbleCallerId); | 212 controller_->CloseBubble(kBubbleCallerId); |
212 } | 213 } |
213 | 214 |
214 } // namespace speech_input | 215 } // namespace speech_input |
OLD | NEW |