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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/suspicious_module_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/suspicious_module_inci dent.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/suspicious_module_inci dent.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(const char* path) { 18 std::unique_ptr<Incident> MakeIncident(const char* path) {
19 std::unique_ptr<ClientIncidentReport_IncidentData_SuspiciousModuleIncident> 19 std::unique_ptr<ClientIncidentReport_IncidentData_SuspiciousModuleIncident>
20 incident(new ClientIncidentReport_IncidentData_SuspiciousModuleIncident); 20 incident(new ClientIncidentReport_IncidentData_SuspiciousModuleIncident);
21 incident->set_path(path); 21 incident->set_path(path);
(...skipping 17 matching lines...) Expand all
39 MakeIncident("foo")->ComputeDigest()); 39 MakeIncident("foo")->ComputeDigest());
40 } 40 }
41 41
42 // Tests that GetDigest returns different values for different incidents. 42 // Tests that GetDigest returns different values for different incidents.
43 TEST(SuspiciousModuleIncident, DifferentIncidentDifferentDigest) { 43 TEST(SuspiciousModuleIncident, DifferentIncidentDifferentDigest) {
44 ASSERT_NE(MakeIncident("foo")->ComputeDigest(), 44 ASSERT_NE(MakeIncident("foo")->ComputeDigest(),
45 MakeIncident("bar")->ComputeDigest()); 45 MakeIncident("bar")->ComputeDigest());
46 } 46 }
47 47
48 } // namespace safe_browsing 48 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698