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

Side by Side Diff: chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc

Issue 11413050: chrome/browser: Update calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 <algorithm> 5 #include <algorithm>
6 #include <map> 6 #include <map>
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 virtual void TearDown(); 192 virtual void TearDown();
193 193
194 // Let the DB thread run to completion of all current tasks. 194 // Let the DB thread run to completion of all current tasks.
195 void RunDBThread() { 195 void RunDBThread() {
196 base::WaitableEvent event(false, false); 196 base::WaitableEvent event(false, false);
197 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, 197 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
198 base::Bind(ThreadDone, &event)); 198 base::Bind(ThreadDone, &event));
199 event.Wait(); 199 event.Wait();
200 // Some of the tests may post messages to the UI thread, but we don't need 200 // Some of the tests may post messages to the UI thread, but we don't need
201 // to run those until after the DB thread is finished. So run it here. 201 // to run those until after the DB thread is finished. So run it here.
202 message_loop_.RunAllPending(); 202 message_loop_.RunUntilIdle();
203 } 203 }
204 static void ThreadDone(base::WaitableEvent* event) { 204 static void ThreadDone(base::WaitableEvent* event) {
205 event->Signal(); 205 event->Signal();
206 } 206 }
207 207
208 // Utilities to help verify sets of expectations. 208 // Utilities to help verify sets of expectations.
209 typedef std::vector< 209 typedef std::vector<
210 std::pair<std::string, 210 std::pair<std::string,
211 std::vector<const PasswordForm*> > > ExpectationArray; 211 std::vector<const PasswordForm*> > > ExpectationArray;
212 void CheckPasswordForms(const std::string& folder, 212 void CheckPasswordForms(const std::string& folder,
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 CheckVersion0Pickle(true, PasswordForm::SCHEME_BASIC); 1079 CheckVersion0Pickle(true, PasswordForm::SCHEME_BASIC);
1080 } 1080 }
1081 1081
1082 TEST_F(NativeBackendKWalletPickleTest, ReadsOld64BitHTMLPickles) { 1082 TEST_F(NativeBackendKWalletPickleTest, ReadsOld64BitHTMLPickles) {
1083 CheckVersion0Pickle(false, PasswordForm::SCHEME_HTML); 1083 CheckVersion0Pickle(false, PasswordForm::SCHEME_HTML);
1084 } 1084 }
1085 1085
1086 TEST_F(NativeBackendKWalletPickleTest, ReadsOld64BitHTTPPickles) { 1086 TEST_F(NativeBackendKWalletPickleTest, ReadsOld64BitHTTPPickles) {
1087 CheckVersion0Pickle(false, PasswordForm::SCHEME_BASIC); 1087 CheckVersion0Pickle(false, PasswordForm::SCHEME_BASIC);
1088 } 1088 }
OLDNEW
« no previous file with comments | « chrome/browser/page_cycler/page_cycler_unittest.cc ('k') | chrome/browser/password_manager/password_store_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698