| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 profile_.reset(new TestingProfile()); | 114 profile_.reset(new TestingProfile()); |
| 115 | 115 |
| 116 login_db_.reset(new LoginDatabase()); | 116 login_db_.reset(new LoginDatabase()); |
| 117 ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append( | 117 ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append( |
| 118 FILE_PATH_LITERAL("login_test")))); | 118 FILE_PATH_LITERAL("login_test")))); |
| 119 base::FilePath path = temp_dir_.path().AppendASCII("web_data_test"); | 119 base::FilePath path = temp_dir_.path().AppendASCII("web_data_test"); |
| 120 wdbs_ = new WebDatabaseService(path); | 120 wdbs_ = new WebDatabaseService(path); |
| 121 // Need to add at least one table so the database gets created. | 121 // Need to add at least one table so the database gets created. |
| 122 wdbs_->AddTable(scoped_ptr<WebDatabaseTable>(new LoginsTable())); | 122 wdbs_->AddTable(scoped_ptr<WebDatabaseTable>(new LoginsTable())); |
| 123 wdbs_->LoadDatabase(WebDatabaseService::InitCallback()); | 123 wdbs_->LoadDatabase(); |
| 124 wds_ = new WebDataService(wdbs_, | 124 wds_ = new WebDataService(wdbs_, |
| 125 WebDataServiceBase::ProfileErrorCallback()); | 125 WebDataServiceBase::ProfileErrorCallback()); |
| 126 wds_->Init(); | 126 wds_->Init(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 virtual void TearDown() { | 129 virtual void TearDown() { |
| 130 if (store_.get()) | 130 if (store_.get()) |
| 131 store_->ShutdownOnUIThread(); | 131 store_->ShutdownOnUIThread(); |
| 132 wds_->ShutdownOnUIThread(); | 132 wds_->ShutdownOnUIThread(); |
| 133 wdbs_->ShutdownDatabase(); | 133 wdbs_->ShutdownDatabase(); |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 VectorOfForms expect_none; | 418 VectorOfForms expect_none; |
| 419 // expect that we get no results; | 419 // expect that we get no results; |
| 420 EXPECT_CALL( | 420 EXPECT_CALL( |
| 421 consumer, | 421 consumer, |
| 422 OnPasswordStoreRequestDone(_, ContainsAllPasswordForms(expect_none))) | 422 OnPasswordStoreRequestDone(_, ContainsAllPasswordForms(expect_none))) |
| 423 .WillOnce(DoAll(WithArg<1>(STLDeleteElements0()), QuitUIMessageLoop())); | 423 .WillOnce(DoAll(WithArg<1>(STLDeleteElements0()), QuitUIMessageLoop())); |
| 424 | 424 |
| 425 store_->GetAutofillableLogins(&consumer); | 425 store_->GetAutofillableLogins(&consumer); |
| 426 MessageLoop::current()->Run(); | 426 MessageLoop::current()->Run(); |
| 427 } | 427 } |
| OLD | NEW |