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

Side by Side Diff: chrome/browser/password_manager/password_store_win_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 <windows.h> 5 #include <windows.h>
6 #include <wincrypt.h> 6 #include <wincrypt.h>
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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 scoped_ptr<PasswordForm> form(CreatePasswordFormFromData(form_data)); 249 scoped_ptr<PasswordForm> form(CreatePasswordFormFromData(form_data));
250 250
251 MockPasswordStoreConsumer consumer; 251 MockPasswordStoreConsumer consumer;
252 store_->GetLogins(*form, &consumer); 252 store_->GetLogins(*form, &consumer);
253 253
254 // Release the PSW and the WDS before the query can return. 254 // Release the PSW and the WDS before the query can return.
255 store_->ShutdownOnUIThread(); 255 store_->ShutdownOnUIThread();
256 store_ = NULL; 256 store_ = NULL;
257 wds_ = NULL; 257 wds_ = NULL;
258 258
259 MessageLoop::current()->RunAllPending(); 259 MessageLoop::current()->RunUntilIdle();
260 } 260 }
261 261
262 // Hangs flakily, see http://crbug.com/43836. 262 // Hangs flakily, see http://crbug.com/43836.
263 TEST_F(PasswordStoreWinTest, DISABLED_MultipleWDSQueriesOnDifferentThreads) { 263 TEST_F(PasswordStoreWinTest, DISABLED_MultipleWDSQueriesOnDifferentThreads) {
264 IE7PasswordInfo password_info; 264 IE7PasswordInfo password_info;
265 ASSERT_TRUE(CreateIE7PasswordInfo(L"http://example.com/origin", 265 ASSERT_TRUE(CreateIE7PasswordInfo(L"http://example.com/origin",
266 base::Time::FromDoubleT(1), 266 base::Time::FromDoubleT(1),
267 &password_info)); 267 &password_info));
268 wds_->AddIE7Login(password_info); 268 wds_->AddIE7Login(password_info);
269 269
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 406
407 VectorOfForms expect_none; 407 VectorOfForms expect_none;
408 // expect that we get no results; 408 // expect that we get no results;
409 EXPECT_CALL(consumer, OnPasswordStoreRequestDone( 409 EXPECT_CALL(consumer, OnPasswordStoreRequestDone(
410 _, ContainsAllPasswordForms(expect_none))) 410 _, ContainsAllPasswordForms(expect_none)))
411 .WillOnce(DoAll(WithArg<1>(STLDeleteElements0()), QuitUIMessageLoop())); 411 .WillOnce(DoAll(WithArg<1>(STLDeleteElements0()), QuitUIMessageLoop()));
412 412
413 store_->GetAutofillableLogins(&consumer); 413 store_->GetAutofillableLogins(&consumer);
414 MessageLoop::current()->Run(); 414 MessageLoop::current()->Run();
415 } 415 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698