OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/variations_seed_signat
ure_incident.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/variations_seed_signat
ure_incident.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "chrome/common/safe_browsing/csd.pb.h" | 11 #include "components/safe_browsing/csd.pb.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace safe_browsing { | 14 namespace safe_browsing { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 std::unique_ptr<Incident> MakeIncident(bool alternate) { | 18 std::unique_ptr<Incident> MakeIncident(bool alternate) { |
19 std::unique_ptr< | 19 std::unique_ptr< |
20 ClientIncidentReport_IncidentData_VariationsSeedSignatureIncident> | 20 ClientIncidentReport_IncidentData_VariationsSeedSignatureIncident> |
21 incident( | 21 incident( |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 MakeIncident(false)->ComputeDigest()); | 53 MakeIncident(false)->ComputeDigest()); |
54 } | 54 } |
55 | 55 |
56 // Tests that GetDigest returns different values for different incidents. | 56 // Tests that GetDigest returns different values for different incidents. |
57 TEST(VariationsSeedSignatureIncident, DifferentIncidentDifferentDigest) { | 57 TEST(VariationsSeedSignatureIncident, DifferentIncidentDifferentDigest) { |
58 EXPECT_NE(MakeIncident(false)->ComputeDigest(), | 58 EXPECT_NE(MakeIncident(false)->ComputeDigest(), |
59 MakeIncident(true)->ComputeDigest()); | 59 MakeIncident(true)->ComputeDigest()); |
60 } | 60 } |
61 | 61 |
62 } // namespace safe_browsing | 62 } // namespace safe_browsing |
OLD | NEW |