| 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 #include "chrome/browser/safe_browsing/incident_reporting/preference_validation_
delegate.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/preference_validation_
delegate.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <utility> | 11 #include <utility> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/bind.h" | 14 #include "base/bind.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" | 17 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" |
| 18 #include "chrome/browser/safe_browsing/incident_reporting/mock_incident_receiver
.h" | 18 #include "chrome/browser/safe_browsing/incident_reporting/mock_incident_receiver
.h" |
| 19 #include "chrome/common/safe_browsing/csd.pb.h" | 19 #include "components/safe_browsing/csd.pb.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 using ::testing::_; | 23 using ::testing::_; |
| 24 using ::testing::IsNull; | 24 using ::testing::IsNull; |
| 25 using ::testing::NiceMock; | 25 using ::testing::NiceMock; |
| 26 using ::testing::WithArg; | 26 using ::testing::WithArg; |
| 27 | 27 |
| 28 // A basic test harness that creates a delegate instance for which it stores all | 28 // A basic test harness that creates a delegate instance for which it stores all |
| 29 // incidents. Tests can push data to the delegate and verify that the test | 29 // incidents. Tests can push data to the delegate and verify that the test |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 INSTANTIATE_TEST_CASE_P( | 342 INSTANTIATE_TEST_CASE_P( |
| 343 WithIncidentIgnoreBypass, | 343 WithIncidentIgnoreBypass, |
| 344 PreferenceValidationDelegateWithIncident, | 344 PreferenceValidationDelegateWithIncident, |
| 345 testing::Combine( | 345 testing::Combine( |
| 346 testing::Values(PrefHashStoreTransaction::CLEARED, | 346 testing::Values(PrefHashStoreTransaction::CLEARED, |
| 347 PrefHashStoreTransaction::CHANGED, | 347 PrefHashStoreTransaction::CHANGED, |
| 348 PrefHashStoreTransaction::UNTRUSTED_UNKNOWN_VALUE), | 348 PrefHashStoreTransaction::UNTRUSTED_UNKNOWN_VALUE), |
| 349 testing::Values(PrefHashStoreTransaction::CHANGED, | 349 testing::Values(PrefHashStoreTransaction::CHANGED, |
| 350 PrefHashStoreTransaction::CLEARED), | 350 PrefHashStoreTransaction::CLEARED), |
| 351 testing::Bool())); | 351 testing::Bool())); |
| OLD | NEW |