| Index: chrome/browser/safe_browsing/incident_reporting/suspicious_module_incident_unittest.cc
|
| diff --git a/chrome/browser/safe_browsing/incident_reporting/blacklist_load_incident_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/suspicious_module_incident_unittest.cc
|
| similarity index 61%
|
| copy from chrome/browser/safe_browsing/incident_reporting/blacklist_load_incident_unittest.cc
|
| copy to chrome/browser/safe_browsing/incident_reporting/suspicious_module_incident_unittest.cc
|
| index 91a09815bd5c7715f807d2efcf27ab359bf6da38..092268cd7f3b5915845785db9ba5ba5c56c69394 100644
|
| --- a/chrome/browser/safe_browsing/incident_reporting/blacklist_load_incident_unittest.cc
|
| +++ b/chrome/browser/safe_browsing/incident_reporting/suspicious_module_incident_unittest.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/safe_browsing/incident_reporting/blacklist_load_incident.h"
|
| +#include "chrome/browser/safe_browsing/incident_reporting/suspicious_module_incident.h"
|
|
|
| #include <utility>
|
|
|
| @@ -15,31 +15,31 @@ namespace safe_browsing {
|
| namespace {
|
|
|
| scoped_ptr<Incident> MakeIncident(const char* digest) {
|
| - scoped_ptr<ClientIncidentReport_IncidentData_BlacklistLoadIncident> incident(
|
| - new ClientIncidentReport_IncidentData_BlacklistLoadIncident);
|
| + scoped_ptr<ClientIncidentReport_IncidentData_SuspiciousModuleIncident>
|
| + incident(new ClientIncidentReport_IncidentData_SuspiciousModuleIncident);
|
| incident->set_path("foo");
|
| - return make_scoped_ptr(new BlacklistLoadIncident(std::move(incident)));
|
| + return make_scoped_ptr(new SuspiciousModuleIncident(std::move(incident)));
|
| }
|
|
|
| } // namespace
|
|
|
| -TEST(BlacklistLoadIncident, GetType) {
|
| - ASSERT_EQ(IncidentType::BLACKLIST_LOAD, MakeIncident("37")->GetType());
|
| +TEST(SuspiciousModuleIncident, GetType) {
|
| + ASSERT_EQ(IncidentType::SUSPICIOUS_MODULE, MakeIncident("37")->GetType());
|
| }
|
|
|
| // Tests that GetKey returns the dll path.
|
| -TEST(BlacklistLoadIncident, KeyIsPath) {
|
| +TEST(SuspiciousModuleIncident, KeyIsPath) {
|
| ASSERT_EQ(std::string("foo"), MakeIncident("37")->GetKey());
|
| }
|
|
|
| // Tests that GetDigest returns the same value for the same incident.
|
| -TEST(BlacklistLoadIncident, SameIncidentSameDigest) {
|
| +TEST(SuspiciousModuleIncident, SameIncidentSameDigest) {
|
| ASSERT_EQ(MakeIncident("37")->ComputeDigest(),
|
| MakeIncident("37")->ComputeDigest());
|
| }
|
|
|
| // Tests that GetDigest returns different values for different incidents.
|
| -TEST(BlacklistLoadIncident, DifferentIncidentDifferentDigest) {
|
| +TEST(SuspiciousModuleIncident, DifferentIncidentDifferentDigest) {
|
| ASSERT_EQ(MakeIncident("37")->ComputeDigest(),
|
| MakeIncident("42")->ComputeDigest());
|
| }
|
|
|