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

Side by Side Diff: chrome/browser/printing/print_dialog_cloud_interative_uitest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 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 "chrome/browser/printing/print_dialog_cloud.h" 5 #include "chrome/browser/printing/print_dialog_cloud.h"
6 #include "chrome/browser/printing/print_dialog_cloud_internal.h" 6 #include "chrome/browser/printing/print_dialog_cloud_internal.h"
7 7
8 #include <functional> 8 #include <functional>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 // Must be static for handing into AddHostnameHandler. 155 // Must be static for handing into AddHostnameHandler.
156 static net::URLRequest::ProtocolFactory Factory; 156 static net::URLRequest::ProtocolFactory Factory;
157 157
158 class AutoQuitDelegate : public net::TestDelegate { 158 class AutoQuitDelegate : public net::TestDelegate {
159 public: 159 public:
160 AutoQuitDelegate() {} 160 AutoQuitDelegate() {}
161 161
162 virtual void OnResponseCompleted(net::URLRequest* request) OVERRIDE { 162 virtual void OnResponseCompleted(net::URLRequest* request) OVERRIDE {
163 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 163 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
164 MessageLoop::QuitClosure()); 164 base::MessageLoop::QuitClosure());
165 } 165 }
166 }; 166 };
167 167
168 virtual void SetUp() OVERRIDE { 168 virtual void SetUp() OVERRIDE {
169 TestController::GetInstance()->set_result(false); 169 TestController::GetInstance()->set_result(false);
170 InProcessBrowserTest::SetUp(); 170 InProcessBrowserTest::SetUp();
171 } 171 }
172 172
173 virtual void TearDown() OVERRIDE { 173 virtual void TearDown() OVERRIDE {
174 if (handler_added_) { 174 if (handler_added_) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 BrowserWindow* window = browser()->window(); 275 BrowserWindow* window = browser()->window();
276 ASSERT_TRUE(window); 276 ASSERT_TRUE(window);
277 gfx::NativeWindow native_window = window->GetNativeWindow(); 277 gfx::NativeWindow native_window = window->GetNativeWindow();
278 ASSERT_TRUE(native_window); 278 ASSERT_TRUE(native_window);
279 bool key_sent = ui_controls::SendKeyPress(native_window, ui::VKEY_ESCAPE, 279 bool key_sent = ui_controls::SendKeyPress(native_window, ui::VKEY_ESCAPE,
280 false, false, false, false); 280 false, false, false, false);
281 EXPECT_TRUE(key_sent); 281 EXPECT_TRUE(key_sent);
282 if (key_sent) 282 if (key_sent)
283 tab_closed_observer.Wait(); 283 tab_closed_observer.Wait();
284 } 284 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698