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

Side by Side Diff: chrome/browser/printing/cloud_print/test/cloud_print_proxy_process_browsertest.cc

Issue 10822030: Move ui_test_utils::RunMessageLoop to test_utils so that it can be reused by content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 // Create a service process that uses a Mock to respond to the browser in order 5 // Create a service process that uses a Mock to respond to the browser in order
6 // to test launching the browser using the cloud print policy check command 6 // to test launching the browser using the cloud print policy check command
7 // line switch. 7 // line switch.
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 class WindowedChannelConnectionObserver { 329 class WindowedChannelConnectionObserver {
330 public: 330 public:
331 WindowedChannelConnectionObserver() 331 WindowedChannelConnectionObserver()
332 : seen_(false), 332 : seen_(false),
333 running_(false) { } 333 running_(false) { }
334 334
335 void Wait() { 335 void Wait() {
336 if (seen_) 336 if (seen_)
337 return; 337 return;
338 running_ = true; 338 running_ = true;
339 ui_test_utils::RunMessageLoop(); 339 content::RunMessageLoop();
340 } 340 }
341 341
342 void Notify() { 342 void Notify() {
343 seen_ = true; 343 seen_ = true;
344 if (running_) 344 if (running_)
345 MessageLoopForUI::current()->Quit(); 345 MessageLoopForUI::current()->Quit();
346 } 346 }
347 347
348 private: 348 private:
349 bool seen_; 349 bool seen_;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 // No expectations on run_loop being true here; that would be a race 533 // No expectations on run_loop being true here; that would be a race
534 // condition. 534 // condition.
535 if (run_loop) 535 if (run_loop)
536 MessageLoop::current()->Run(); 536 MessageLoop::current()->Run();
537 537
538 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail)); 538 EXPECT_EQ("", prefs->GetString(prefs::kCloudPrintEmail));
539 539
540 ShutdownAndWaitForExitWithTimeout(handle); 540 ShutdownAndWaitForExitWithTimeout(handle);
541 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy"); 541 profile_manager.DeleteTestingProfile("StartBrowserWithPolicy");
542 } 542 }
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/printing/print_dialog_cloud_interative_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698