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/browser/ui/browser.h" |
9 #include "chrome/test/browser_with_test_window_test.h" | 9 #include "chrome/test/browser_with_test_window_test.h" |
10 #include "chrome/test/testing_profile.h" | 10 #include "chrome/test/testing_profile.h" |
11 #include "gfx/rect.h" | |
12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "ui/gfx/rect.h" |
13 | 13 |
14 class SkBitmap; | 14 class SkBitmap; |
15 | 15 |
16 namespace speech_input { | 16 namespace speech_input { |
17 | 17 |
18 // 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 |
19 // user and closing of the info bubble. | 19 // user and closing of the info bubble. |
20 class MockSpeechInputBubble : public SpeechInputBubbleBase { | 20 class MockSpeechInputBubble : public SpeechInputBubbleBase { |
21 public: | 21 public: |
22 enum BubbleType { | 22 enum BubbleType { |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 controller_->CreateBubble(kBubbleCallerId, 1, 1, gfx::Rect(1, 1)); | 207 controller_->CreateBubble(kBubbleCallerId, 1, 1, gfx::Rect(1, 1)); |
208 MessageLoop::current()->Run(); | 208 MessageLoop::current()->Run(); |
209 EXPECT_FALSE(cancel_clicked_); | 209 EXPECT_FALSE(cancel_clicked_); |
210 EXPECT_TRUE(try_again_clicked_); | 210 EXPECT_TRUE(try_again_clicked_); |
211 EXPECT_FALSE(focus_changed_); | 211 EXPECT_FALSE(focus_changed_); |
212 controller_->CloseBubble(kBubbleCallerId); | 212 controller_->CloseBubble(kBubbleCallerId); |
213 } | 213 } |
214 | 214 |
215 } // namespace speech_input | 215 } // namespace speech_input |
OLD | NEW |