| OLD | NEW |
| 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 <windows.h> | 5 #include <windows.h> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 #include <wincrypt.h> | 8 #include <wincrypt.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append( | 113 ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append( |
| 114 FILE_PATH_LITERAL("login_test")))); | 114 FILE_PATH_LITERAL("login_test")))); |
| 115 | 115 |
| 116 wds_ = new WebDataService(); | 116 wds_ = new WebDataService(); |
| 117 ASSERT_TRUE(wds_->Init(temp_dir_.path())); | 117 ASSERT_TRUE(wds_->Init(temp_dir_.path())); |
| 118 } | 118 } |
| 119 | 119 |
| 120 virtual void TearDown() { | 120 virtual void TearDown() { |
| 121 if (wds_.get()) | 121 if (wds_.get()) |
| 122 wds_->Shutdown(); | 122 wds_->Shutdown(); |
| 123 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask); | 123 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure); |
| 124 MessageLoop::current()->Run(); | 124 MessageLoop::current()->Run(); |
| 125 db_thread_.Stop(); | 125 db_thread_.Stop(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 MessageLoopForUI message_loop_; | 128 MessageLoopForUI message_loop_; |
| 129 content::TestBrowserThread ui_thread_; | 129 content::TestBrowserThread ui_thread_; |
| 130 // PasswordStore, WDS schedule work on this thread. | 130 // PasswordStore, WDS schedule work on this thread. |
| 131 content::TestBrowserThread db_thread_; | 131 content::TestBrowserThread db_thread_; |
| 132 | 132 |
| 133 scoped_ptr<LoginDatabase> login_db_; | 133 scoped_ptr<LoginDatabase> login_db_; |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 // expect that we get no results; | 594 // expect that we get no results; |
| 595 EXPECT_CALL(consumer, OnPasswordStoreRequestDone( | 595 EXPECT_CALL(consumer, OnPasswordStoreRequestDone( |
| 596 _, ContainsAllPasswordForms(expect_none))) | 596 _, ContainsAllPasswordForms(expect_none))) |
| 597 .WillOnce(DoAll(WithArg<1>(STLDeleteElements0()), QuitUIMessageLoop())); | 597 .WillOnce(DoAll(WithArg<1>(STLDeleteElements0()), QuitUIMessageLoop())); |
| 598 | 598 |
| 599 store->GetAutofillableLogins(&consumer); | 599 store->GetAutofillableLogins(&consumer); |
| 600 MessageLoop::current()->Run(); | 600 MessageLoop::current()->Run(); |
| 601 | 601 |
| 602 store->Shutdown(); | 602 store->Shutdown(); |
| 603 } | 603 } |
| OLD | NEW |