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

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

Issue 120983002: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/speech/speech_recognition_bubble_controller.h" 8 #include "chrome/browser/speech/speech_recognition_bubble_controller.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_tabstrip.h" 10 #include "chrome/browser/ui/browser_tabstrip.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 120
121 virtual void TearDown() { 121 virtual void TearDown() {
122 SpeechRecognitionBubble::set_factory(NULL); 122 SpeechRecognitionBubble::set_factory(NULL);
123 BrowserWithTestWindowTest::TearDown(); 123 BrowserWithTestWindowTest::TearDown();
124 } 124 }
125 125
126 static void ActivateBubble() { 126 static void ActivateBubble() {
127 if (MockSpeechRecognitionBubble::type() != 127 if (MockSpeechRecognitionBubble::type() !=
128 MockSpeechRecognitionBubble::BUBBLE_TEST_FOCUS_CHANGED) { 128 MockSpeechRecognitionBubble::BUBBLE_TEST_FOCUS_CHANGED) {
129 test_fixture_->controller_->SetBubbleMessage(ASCIIToUTF16("Test")); 129 test_fixture_->controller_->SetBubbleMessage(base::ASCIIToUTF16("Test"));
130 } 130 }
131 } 131 }
132 132
133 static SpeechRecognitionBubble* CreateBubble( 133 static SpeechRecognitionBubble* CreateBubble(
134 WebContents* web_contents, 134 WebContents* web_contents,
135 SpeechRecognitionBubble::Delegate* delegate, 135 SpeechRecognitionBubble::Delegate* delegate,
136 const gfx::Rect& element_rect) { 136 const gfx::Rect& element_rect) {
137 EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI)); 137 EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
138 // Set up to activate the bubble soon after it gets created, since we test 138 // Set up to activate the bubble soon after it gets created, since we test
139 // events sent by the bubble and those are handled only when the bubble is 139 // events sent by the bubble and those are handled only when the bubble is
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 controller_->CreateBubble(kBubbleSessionId, 1, 1, gfx::Rect(1, 1)); 207 controller_->CreateBubble(kBubbleSessionId, 1, 1, gfx::Rect(1, 1));
208 base::RunLoop().RunUntilIdle(); 208 base::RunLoop().RunUntilIdle();
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(); 212 controller_->CloseBubble();
213 } 213 }
214 214
215 } // namespace speech 215 } // namespace speech
OLDNEW
« no previous file with comments | « chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc ('k') | chrome/browser/speech/tts_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698