| 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 "chrome/browser/password_manager/password_store_x.h" | 5 #include "chrome/browser/password_manager/password_store_x.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 | 346 |
| 347 void PasswordStoreXTestDelegate::FinishAsyncProcessing() { | 347 void PasswordStoreXTestDelegate::FinishAsyncProcessing() { |
| 348 base::RunLoop().RunUntilIdle(); | 348 base::RunLoop().RunUntilIdle(); |
| 349 } | 349 } |
| 350 | 350 |
| 351 void PasswordStoreXTestDelegate::SetupTempDir() { | 351 void PasswordStoreXTestDelegate::SetupTempDir() { |
| 352 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 352 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 353 } | 353 } |
| 354 | 354 |
| 355 base::FilePath PasswordStoreXTestDelegate::test_login_db_file_path() const { | 355 base::FilePath PasswordStoreXTestDelegate::test_login_db_file_path() const { |
| 356 return temp_dir_.path().Append(FILE_PATH_LITERAL("login_test")); | 356 return temp_dir_.GetPath().Append(FILE_PATH_LITERAL("login_test")); |
| 357 } | 357 } |
| 358 | 358 |
| 359 class PasswordStoreXNoBackendTestDelegate : public PasswordStoreXTestDelegate { | 359 class PasswordStoreXNoBackendTestDelegate : public PasswordStoreXTestDelegate { |
| 360 public: | 360 public: |
| 361 PasswordStoreXNoBackendTestDelegate() | 361 PasswordStoreXNoBackendTestDelegate() |
| 362 : PasswordStoreXTestDelegate(NO_BACKEND) {} | 362 : PasswordStoreXTestDelegate(NO_BACKEND) {} |
| 363 }; | 363 }; |
| 364 | 364 |
| 365 class PasswordStoreXWorkingBackendTestDelegate | 365 class PasswordStoreXWorkingBackendTestDelegate |
| 366 : public PasswordStoreXTestDelegate { | 366 : public PasswordStoreXTestDelegate { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 384 | 384 |
| 385 class PasswordStoreXTest : public testing::TestWithParam<BackendType> { | 385 class PasswordStoreXTest : public testing::TestWithParam<BackendType> { |
| 386 protected: | 386 protected: |
| 387 void SetUp() override { | 387 void SetUp() override { |
| 388 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 388 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 389 } | 389 } |
| 390 | 390 |
| 391 void TearDown() override { base::RunLoop().RunUntilIdle(); } | 391 void TearDown() override { base::RunLoop().RunUntilIdle(); } |
| 392 | 392 |
| 393 base::FilePath test_login_db_file_path() const { | 393 base::FilePath test_login_db_file_path() const { |
| 394 return temp_dir_.path().Append(FILE_PATH_LITERAL("login_test")); | 394 return temp_dir_.GetPath().Append(FILE_PATH_LITERAL("login_test")); |
| 395 } | 395 } |
| 396 | 396 |
| 397 content::TestBrowserThreadBundle thread_bundle_; | 397 content::TestBrowserThreadBundle thread_bundle_; |
| 398 | 398 |
| 399 base::ScopedTempDir temp_dir_; | 399 base::ScopedTempDir temp_dir_; |
| 400 }; | 400 }; |
| 401 | 401 |
| 402 ACTION(STLDeleteElements0) { | 402 ACTION(STLDeleteElements0) { |
| 403 base::STLDeleteContainerPointers(arg0.begin(), arg0.end()); | 403 base::STLDeleteContainerPointers(arg0.begin(), arg0.end()); |
| 404 } | 404 } |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 | 583 |
| 584 INSTANTIATE_TEST_CASE_P(NoBackend, | 584 INSTANTIATE_TEST_CASE_P(NoBackend, |
| 585 PasswordStoreXTest, | 585 PasswordStoreXTest, |
| 586 testing::Values(NO_BACKEND)); | 586 testing::Values(NO_BACKEND)); |
| 587 INSTANTIATE_TEST_CASE_P(FailingBackend, | 587 INSTANTIATE_TEST_CASE_P(FailingBackend, |
| 588 PasswordStoreXTest, | 588 PasswordStoreXTest, |
| 589 testing::Values(FAILING_BACKEND)); | 589 testing::Values(FAILING_BACKEND)); |
| 590 INSTANTIATE_TEST_CASE_P(WorkingBackend, | 590 INSTANTIATE_TEST_CASE_P(WorkingBackend, |
| 591 PasswordStoreXTest, | 591 PasswordStoreXTest, |
| 592 testing::Values(WORKING_BACKEND)); | 592 testing::Values(WORKING_BACKEND)); |
| OLD | NEW |