| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/platform_file.h" | 7 #include "base/platform_file.h" |
| 8 #include "base/scoped_temp_dir.h" | 8 #include "base/scoped_temp_dir.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 autofillable ? L"password_value" : NULL, | 263 autofillable ? L"password_value" : NULL, |
| 264 autofillable, false, i + 1 }; | 264 autofillable, false, i + 1 }; |
| 265 forms->push_back(CreatePasswordFormFromData(data)); | 265 forms->push_back(CreatePasswordFormFromData(data)); |
| 266 } | 266 } |
| 267 } | 267 } |
| 268 | 268 |
| 269 } // anonymous namespace | 269 } // anonymous namespace |
| 270 | 270 |
| 271 // LoginDatabase isn't reference counted, but in these unit tests that won't be | 271 // LoginDatabase isn't reference counted, but in these unit tests that won't be |
| 272 // a problem as it always outlives the threads we post tasks to. | 272 // a problem as it always outlives the threads we post tasks to. |
| 273 template<> | 273 DISABLE_RUNNABLE_METHOD_REFCOUNT(LoginDatabase); |
| 274 struct RunnableMethodTraits<LoginDatabase> { | |
| 275 void RetainCallee(LoginDatabase*) {} | |
| 276 void ReleaseCallee(LoginDatabase*) {} | |
| 277 }; | |
| 278 | 274 |
| 279 enum BackendType { | 275 enum BackendType { |
| 280 NO_BACKEND, | 276 NO_BACKEND, |
| 281 FAILING_BACKEND, | 277 FAILING_BACKEND, |
| 282 WORKING_BACKEND | 278 WORKING_BACKEND |
| 283 }; | 279 }; |
| 284 | 280 |
| 285 class PasswordStoreXTest : public testing::TestWithParam<BackendType> { | 281 class PasswordStoreXTest : public testing::TestWithParam<BackendType> { |
| 286 protected: | 282 protected: |
| 287 PasswordStoreXTest() | 283 PasswordStoreXTest() |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 | 759 |
| 764 INSTANTIATE_TEST_CASE_P(NoBackend, | 760 INSTANTIATE_TEST_CASE_P(NoBackend, |
| 765 PasswordStoreXTest, | 761 PasswordStoreXTest, |
| 766 testing::Values(NO_BACKEND)); | 762 testing::Values(NO_BACKEND)); |
| 767 INSTANTIATE_TEST_CASE_P(FailingBackend, | 763 INSTANTIATE_TEST_CASE_P(FailingBackend, |
| 768 PasswordStoreXTest, | 764 PasswordStoreXTest, |
| 769 testing::Values(FAILING_BACKEND)); | 765 testing::Values(FAILING_BACKEND)); |
| 770 INSTANTIATE_TEST_CASE_P(WorkingBackend, | 766 INSTANTIATE_TEST_CASE_P(WorkingBackend, |
| 771 PasswordStoreXTest, | 767 PasswordStoreXTest, |
| 772 testing::Values(WORKING_BACKEND)); | 768 testing::Values(WORKING_BACKEND)); |
| OLD | NEW |