OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Note: This test focuses on functionality implemented in AffiliationService | 5 // Note: This test focuses on functionality implemented in AffiliationService |
6 // itself. More thorough The AffiliationBackend is tested in-depth separarately. | 6 // itself. More thorough The AffiliationBackend is tested in-depth separarately. |
7 | 7 |
8 #include "components/password_manager/core/browser/affiliation_service.h" | 8 #include "components/password_manager/core/browser/affiliation_service.h" |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/test/test_mock_time_task_runner.h" | 16 #include "base/test/test_mock_time_task_runner.h" |
17 #include "base/test/test_simple_task_runner.h" | 17 #include "base/test/test_simple_task_runner.h" |
18 #include "base/thread_task_runner_handle.h" | 18 #include "base/threading/thread_task_runner_handle.h" |
19 #include "components/password_manager/core/browser/fake_affiliation_api.h" | 19 #include "components/password_manager/core/browser/fake_affiliation_api.h" |
20 #include "components/password_manager/core/browser/mock_affiliation_consumer.h" | 20 #include "components/password_manager/core/browser/mock_affiliation_consumer.h" |
21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 namespace password_manager { | 24 namespace password_manager { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 using StrategyOnCacheMiss = AffiliationService::StrategyOnCacheMiss; | 28 using StrategyOnCacheMiss = AffiliationService::StrategyOnCacheMiss; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 DestroyService(); | 151 DestroyService(); |
152 background_task_runner()->RunUntilIdle(); | 152 background_task_runner()->RunUntilIdle(); |
153 | 153 |
154 mock_consumer()->ExpectFailure(); | 154 mock_consumer()->ExpectFailure(); |
155 main_task_runner()->RunUntilIdle(); | 155 main_task_runner()->RunUntilIdle(); |
156 testing::Mock::VerifyAndClearExpectations(mock_consumer()); | 156 testing::Mock::VerifyAndClearExpectations(mock_consumer()); |
157 } | 157 } |
158 | 158 |
159 } // namespace password_manager | 159 } // namespace password_manager |
OLD | NEW |