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

Side by Side Diff: chrome/browser/chromeos/login/online_attempt_unittest.cc

Issue 8873032: Removing MessageLoop::QuitTask() from chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert 3 more problematic files Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 void CancelLogin(OnlineAttempt* auth) { 83 void CancelLogin(OnlineAttempt* auth) {
84 BrowserThread::PostTask( 84 BrowserThread::PostTask(
85 BrowserThread::IO, FROM_HERE, 85 BrowserThread::IO, FROM_HERE,
86 base::Bind(&OnlineAttempt::CancelClientLogin, auth)); 86 base::Bind(&OnlineAttempt::CancelClientLogin, auth));
87 } 87 }
88 88
89 static void Quit() { 89 static void Quit() {
90 BrowserThread::PostTask( 90 BrowserThread::PostTask(
91 BrowserThread::UI, FROM_HERE, new MessageLoop::QuitTask()); 91 BrowserThread::UI, FROM_HERE, MessageLoop::QuitClosure());
92 } 92 }
93 93
94 static void RunThreadTest() { 94 static void RunThreadTest() {
95 MessageLoop::current()->RunAllPending(); 95 MessageLoop::current()->RunAllPending();
96 } 96 }
97 97
98 MessageLoop message_loop_; 98 MessageLoop message_loop_;
99 content::TestBrowserThread ui_thread_; 99 content::TestBrowserThread ui_thread_;
100 content::TestBrowserThread io_thread_; 100 content::TestBrowserThread io_thread_;
101 TestAttemptState state_; 101 TestAttemptState state_;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 base::Bind(&OnlineAttempt::OnClientLoginFailure, attempt_.get(), error)); 265 base::Bind(&OnlineAttempt::OnClientLoginFailure, attempt_.get(), error));
266 266
267 // Force IO thread to finish tasks so I can verify |state_|. 267 // Force IO thread to finish tasks so I can verify |state_|.
268 io_thread_.Stop(); 268 io_thread_.Stop();
269 EXPECT_TRUE(GoogleServiceAuthError::None() == 269 EXPECT_TRUE(GoogleServiceAuthError::None() ==
270 state_.online_outcome().error()); 270 state_.online_outcome().error());
271 EXPECT_TRUE(GaiaAuthConsumer::ClientLoginResult() == state_.credentials()); 271 EXPECT_TRUE(GaiaAuthConsumer::ClientLoginResult() == state_.credentials());
272 } 272 }
273 273
274 } // namespace chromeos 274 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698