Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc

Issue 10453101: Convert most of the rest of chrome to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/bind.h" 5 #include "base/bind.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/speech/speech_recognition_bubble_controller.h" 7 #include "chrome/browser/speech/speech_recognition_bubble_controller.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
10 #include "chrome/test/base/browser_with_test_window_test.h" 10 #include "chrome/test/base/browser_with_test_window_test.h"
11 #include "chrome/test/base/testing_profile.h" 11 #include "chrome/test/base/testing_profile.h"
12 #include "content/public/test/test_browser_thread.h" 12 #include "content/public/test/test_browser_thread.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 15
16 using content::BrowserThread; 16 using content::BrowserThread;
17 using content::WebContents; 17 using content::WebContents;
18 18
19 class SkBitmap;
20
21 namespace speech { 19 namespace speech {
22 20
23 // A mock bubble class which fakes a focus change or recognition cancel by the 21 // A mock bubble class which fakes a focus change or recognition cancel by the
24 // user and closing of the info bubble. 22 // user and closing of the info bubble.
25 class MockSpeechRecognitionBubble : public SpeechRecognitionBubbleBase { 23 class MockSpeechRecognitionBubble : public SpeechRecognitionBubbleBase {
26 public: 24 public:
27 enum BubbleType { 25 enum BubbleType {
28 BUBBLE_TEST_FOCUS_CHANGED, 26 BUBBLE_TEST_FOCUS_CHANGED,
29 BUBBLE_TEST_CLICK_CANCEL, 27 BUBBLE_TEST_CLICK_CANCEL,
30 BUBBLE_TEST_CLICK_TRY_AGAIN, 28 BUBBLE_TEST_CLICK_TRY_AGAIN,
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 217
220 controller_->CreateBubble(kBubbleSessionId, 1, 1, gfx::Rect(1, 1)); 218 controller_->CreateBubble(kBubbleSessionId, 1, 1, gfx::Rect(1, 1));
221 MessageLoop::current()->Run(); 219 MessageLoop::current()->Run();
222 EXPECT_FALSE(cancel_clicked_); 220 EXPECT_FALSE(cancel_clicked_);
223 EXPECT_TRUE(try_again_clicked_); 221 EXPECT_TRUE(try_again_clicked_);
224 EXPECT_FALSE(focus_changed_); 222 EXPECT_FALSE(focus_changed_);
225 controller_->CloseBubble(kBubbleSessionId); 223 controller_->CloseBubble(kBubbleSessionId);
226 } 224 }
227 225
228 } // namespace speech 226 } // namespace speech
OLDNEW
« no previous file with comments | « chrome/browser/speech/speech_recognition_bubble.cc ('k') | chrome/browser/speech/speech_recognition_tray_icon_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698