OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |