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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/blacklist_load_incident_unittest.cc

Issue 1643573002: Add a ModuleLoadAnalyzer which checks modules against a whitelist (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase-update'd Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/incident_reporting/incident.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/incident_reporting/blacklist_load_incident_unittest.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/blacklist_load_incident_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/blacklist_load_incident_unittest.cc
index 91a09815bd5c7715f807d2efcf27ab359bf6da38..d9efc935e645357b29b88efd186177197516234e 100644
--- a/chrome/browser/safe_browsing/incident_reporting/blacklist_load_incident_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/blacklist_load_incident_unittest.cc
@@ -14,34 +14,34 @@ namespace safe_browsing {
namespace {
-scoped_ptr<Incident> MakeIncident(const char* digest) {
+scoped_ptr<Incident> MakeIncident(const char* path) {
scoped_ptr<ClientIncidentReport_IncidentData_BlacklistLoadIncident> incident(
new ClientIncidentReport_IncidentData_BlacklistLoadIncident);
- incident->set_path("foo");
+ incident->set_path(path);
return make_scoped_ptr(new BlacklistLoadIncident(std::move(incident)));
}
} // namespace
TEST(BlacklistLoadIncident, GetType) {
- ASSERT_EQ(IncidentType::BLACKLIST_LOAD, MakeIncident("37")->GetType());
+ ASSERT_EQ(IncidentType::BLACKLIST_LOAD, MakeIncident("foo")->GetType());
}
// Tests that GetKey returns the dll path.
TEST(BlacklistLoadIncident, KeyIsPath) {
- ASSERT_EQ(std::string("foo"), MakeIncident("37")->GetKey());
+ ASSERT_EQ(std::string("foo"), MakeIncident("foo")->GetKey());
}
// Tests that GetDigest returns the same value for the same incident.
TEST(BlacklistLoadIncident, SameIncidentSameDigest) {
- ASSERT_EQ(MakeIncident("37")->ComputeDigest(),
- MakeIncident("37")->ComputeDigest());
+ ASSERT_EQ(MakeIncident("foo")->ComputeDigest(),
+ MakeIncident("foo")->ComputeDigest());
}
// Tests that GetDigest returns different values for different incidents.
TEST(BlacklistLoadIncident, DifferentIncidentDifferentDigest) {
- ASSERT_EQ(MakeIncident("37")->ComputeDigest(),
- MakeIncident("42")->ComputeDigest());
+ ASSERT_NE(MakeIncident("foo")->ComputeDigest(),
+ MakeIncident("bar")->ComputeDigest());
}
} // namespace safe_browsing
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/incident_reporting/incident.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698