Chromium Code Reviews| Index: chrome/browser/safe_browsing/permission_reporter_unittest.cc |
| diff --git a/chrome/browser/safe_browsing/permission_reporter_unittest.cc b/chrome/browser/safe_browsing/permission_reporter_unittest.cc |
| index ddb88731cf09d545bfc39415fabc71bcb4e40666..8483626aa9e70eb99b1f2ab75ae854f48a45f7c7 100644 |
| --- a/chrome/browser/safe_browsing/permission_reporter_unittest.cc |
| +++ b/chrome/browser/safe_browsing/permission_reporter_unittest.cc |
| @@ -27,10 +27,13 @@ const char kPermissionActionReportingUploadUrl[] = |
| const char kDummyOrigin[] = "http://example.test/"; |
| const PermissionType kDummyPermission = PermissionType::GEOLOCATION; |
| const PermissionAction kDummyAction = GRANTED; |
| +const SourceUI kDummySourceUI = PROMPT; |
| const PermissionReport::PermissionType kDummyPermissionReportPermission = |
| PermissionReport::GEOLOCATION; |
| const PermissionReport::Action kDummyPermissionReportAction = |
| PermissionReport::GRANTED; |
| +const PermissionReport::SourceUI kDummyPermissionReportSourceUI = |
| + PermissionReport::PROMPT; |
| const char kDummyTrialOne[] = "trial one"; |
| const char kDummyGroupOne[] = "group one"; |
| @@ -88,13 +91,14 @@ class PermissionReporterTest : public ::testing::Test { |
| // SafeBrowsing CSD servers. |
| TEST_F(PermissionReporterTest, SendReport) { |
| permission_reporter_->SendReport(GURL(kDummyOrigin), kDummyPermission, |
| - kDummyAction); |
| + kDummyAction, kDummySourceUI); |
| PermissionReport permission_report; |
| ASSERT_TRUE( |
| permission_report.ParseFromString(mock_report_sender_->latest_report())); |
| EXPECT_EQ(kDummyPermissionReportPermission, permission_report.permission()); |
| EXPECT_EQ(kDummyPermissionReportAction, permission_report.action()); |
| + EXPECT_EQ(kDummyPermissionReportSourceUI, permission_report.source_ui()); |
|
raymes
2016/07/12 07:18:14
nit: maybe just inline the 3 constants on the lhs
stefanocs
2016/07/13 01:23:52
Done.
|
| EXPECT_EQ(kDummyOrigin, permission_report.origin()); |
| #if defined(OS_ANDROID) |
| EXPECT_EQ(PermissionReport::ANDROID_PLATFORM, |
| @@ -141,7 +145,7 @@ TEST_F(PermissionReporterTest, SendReportWithFieldTrials) { |
| EXPECT_TRUE(base::FieldTrialList::IsTrialActive(trial_two->trial_name())); |
| permission_reporter_->SendReport(GURL(kDummyOrigin), kDummyPermission, |
| - kDummyAction); |
| + kDummyAction, kDummySourceUI); |
| PermissionReport permission_report; |
| ASSERT_TRUE( |