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 "testing/gmock/include/gmock/gmock.h" | 5 #include "testing/gmock/include/gmock/gmock.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 base::FilePath db_file = db_dir_.path().AppendASCII("login.db"); | 1036 base::FilePath db_file = db_dir_.path().AppendASCII("login.db"); |
1037 ASSERT_TRUE(login_db_->Init(db_file)); | 1037 ASSERT_TRUE(login_db_->Init(db_file)); |
1038 | 1038 |
1039 keychain_ = new MockAppleKeychain(); | 1039 keychain_ = new MockAppleKeychain(); |
1040 | 1040 |
1041 store_ = new PasswordStoreMac( | 1041 store_ = new PasswordStoreMac( |
1042 base::MessageLoopProxy::current(), | 1042 base::MessageLoopProxy::current(), |
1043 base::MessageLoopProxy::current(), | 1043 base::MessageLoopProxy::current(), |
1044 keychain_, | 1044 keychain_, |
1045 login_db_); | 1045 login_db_); |
1046 ASSERT_TRUE(store_->Init()); | 1046 ASSERT_TRUE(store_->Init(syncer::SyncableService::StartSyncFlare())); |
1047 } | 1047 } |
1048 | 1048 |
1049 virtual void TearDown() { | 1049 virtual void TearDown() { |
1050 store_->Shutdown(); | 1050 store_->Shutdown(); |
1051 base::MessageLoop::current()->PostTask(FROM_HERE, | 1051 base::MessageLoop::current()->PostTask(FROM_HERE, |
1052 base::MessageLoop::QuitClosure()); | 1052 base::MessageLoop::QuitClosure()); |
1053 base::MessageLoop::current()->Run(); | 1053 base::MessageLoop::current()->Run(); |
1054 } | 1054 } |
1055 | 1055 |
1056 void WaitForStoreUpdate() { | 1056 void WaitForStoreUpdate() { |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1225 EXPECT_EQ(0u, matching_items.size()); | 1225 EXPECT_EQ(0u, matching_items.size()); |
1226 login_db_->GetLogins(*www_form, &matching_items); | 1226 login_db_->GetLogins(*www_form, &matching_items); |
1227 EXPECT_EQ(0u, matching_items.size()); | 1227 EXPECT_EQ(0u, matching_items.size()); |
1228 // No trace of m.facebook.com. | 1228 // No trace of m.facebook.com. |
1229 matching_items = owned_keychain_adapter.PasswordsFillingForm( | 1229 matching_items = owned_keychain_adapter.PasswordsFillingForm( |
1230 m_form.signon_realm, m_form.scheme); | 1230 m_form.signon_realm, m_form.scheme); |
1231 EXPECT_EQ(0u, matching_items.size()); | 1231 EXPECT_EQ(0u, matching_items.size()); |
1232 login_db_->GetLogins(m_form, &matching_items); | 1232 login_db_->GetLogins(m_form, &matching_items); |
1233 EXPECT_EQ(0u, matching_items.size()); | 1233 EXPECT_EQ(0u, matching_items.size()); |
1234 } | 1234 } |
OLD | NEW |