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

Side by Side Diff: chrome/browser/safe_browsing/permission_reporter_browsertest.cc

Issue 2250893002: Permission Action Reporting: Add num_prior_* fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@par-new-fields-proto
Patch Set: todo Created 4 years, 4 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/permission_reporter.h" 5 #include "chrome/browser/safe_browsing/permission_reporter.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/test/simple_test_clock.h" 10 #include "base/test/simple_test_clock.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 PermissionReport permission_report; 118 PermissionReport permission_report;
119 ASSERT_TRUE( 119 ASSERT_TRUE(
120 permission_report.ParseFromString(mock_report_sender()->latest_report())); 120 permission_report.ParseFromString(mock_report_sender()->latest_report()));
121 EXPECT_EQ(PermissionReport::GEOLOCATION, permission_report.permission()); 121 EXPECT_EQ(PermissionReport::GEOLOCATION, permission_report.permission());
122 EXPECT_EQ(PermissionReport::GRANTED, permission_report.action()); 122 EXPECT_EQ(PermissionReport::GRANTED, permission_report.action());
123 EXPECT_EQ(embedded_test_server()->base_url().spec(), 123 EXPECT_EQ(embedded_test_server()->base_url().spec(),
124 permission_report.origin()); 124 permission_report.origin());
125 EXPECT_EQ(PermissionReport::DESKTOP_PLATFORM, 125 EXPECT_EQ(PermissionReport::DESKTOP_PLATFORM,
126 permission_report.platform_type()); 126 permission_report.platform_type());
127 EXPECT_EQ(PermissionReport::NO_GESTURE, permission_report.gesture()); 127 EXPECT_EQ(PermissionReport::NO_GESTURE, permission_report.gesture());
128 EXPECT_EQ(0, permission_report.num_prior_dismissals());
129 EXPECT_EQ(0, permission_report.num_prior_ignores());
128 } 130 }
129 131
130 } // namespace safe_browsing 132 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/permission_reporter.cc ('k') | chrome/browser/safe_browsing/permission_reporter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698