Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/binary_integrity_incident_unittest.cc

Issue 2733343002: Move chrome/common/safe_browsing/csd.proto to components/safe_browsing (Closed)
Patch Set: rebase again Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/binary_integrity_incid ent.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_incid ent.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "chrome/common/safe_browsing/csd.pb.h" 14 #include "components/safe_browsing/csd.pb.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 namespace safe_browsing { 17 namespace safe_browsing {
18 18
19 namespace { 19 namespace {
20 20
21 std::unique_ptr<Incident> MakeIncident(const char* file_basename) { 21 std::unique_ptr<Incident> MakeIncident(const char* file_basename) {
22 std::unique_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident> 22 std::unique_ptr<ClientIncidentReport_IncidentData_BinaryIntegrityIncident>
23 incident(new ClientIncidentReport_IncidentData_BinaryIntegrityIncident); 23 incident(new ClientIncidentReport_IncidentData_BinaryIntegrityIncident);
24 24
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 ASSERT_EQ(MakeIncident("foo")->ComputeDigest(), 57 ASSERT_EQ(MakeIncident("foo")->ComputeDigest(),
58 MakeIncident("foo")->ComputeDigest()); 58 MakeIncident("foo")->ComputeDigest());
59 } 59 }
60 60
61 TEST(BinaryIntegrityIncident, DifferentIncidentDifferentDigest) { 61 TEST(BinaryIntegrityIncident, DifferentIncidentDifferentDigest) {
62 ASSERT_NE(MakeIncident("foo")->ComputeDigest(), 62 ASSERT_NE(MakeIncident("foo")->ComputeDigest(),
63 MakeIncident("bar")->ComputeDigest()); 63 MakeIncident("bar")->ComputeDigest());
64 } 64 }
65 65
66 } // namespace safe_browsing 66 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698