| OLD | NEW |
| 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/run_loop.h" | 10 #include "base/run_loop.h" |
| 11 #include "base/test/simple_test_clock.h" | 11 #include "base/test/simple_test_clock.h" |
| 12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
| 13 #include "chrome/browser/permissions/permission_request_manager.h" | 13 #include "chrome/browser/permissions/permission_request_manager.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/safe_browsing/mock_permission_report_sender.h" | 15 #include "chrome/browser/safe_browsing/mock_permission_report_sender.h" |
| 16 #include "chrome/browser/safe_browsing/ping_manager.h" | 16 #include "chrome/browser/safe_browsing/ping_manager.h" |
| 17 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 17 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 18 #include "chrome/browser/sync/test/integration/sync_test.h" | 18 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 19 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
| 20 #include "chrome/browser/ui/permission_bubble/mock_permission_prompt_factory.h" |
| 20 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 21 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 21 #include "chrome/browser/ui/website_settings/mock_permission_prompt_factory.h" | |
| 22 #include "chrome/common/safe_browsing/permission_report.pb.h" | 22 #include "chrome/common/safe_browsing/permission_report.pb.h" |
| 23 #include "chrome/test/base/in_process_browser_test.h" | 23 #include "chrome/test/base/in_process_browser_test.h" |
| 24 #include "chrome/test/base/ui_test_utils.h" | 24 #include "chrome/test/base/ui_test_utils.h" |
| 25 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
| 26 | 26 |
| 27 #if !defined(OS_CHROMEOS) | 27 #if !defined(OS_CHROMEOS) |
| 28 #include "chrome/browser/signin/signin_manager_factory.h" | 28 #include "chrome/browser/signin/signin_manager_factory.h" |
| 29 #include "components/signin/core/browser/signin_manager.h" | 29 #include "components/signin/core/browser/signin_manager.h" |
| 30 #endif | 30 #endif |
| 31 | 31 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 permission_report.platform_type()); | 191 permission_report.platform_type()); |
| 192 EXPECT_EQ(PermissionReport::NO_GESTURE, permission_report.gesture()); | 192 EXPECT_EQ(PermissionReport::NO_GESTURE, permission_report.gesture()); |
| 193 EXPECT_EQ(PermissionReport::PERSIST_DECISION_UNSPECIFIED, | 193 EXPECT_EQ(PermissionReport::PERSIST_DECISION_UNSPECIFIED, |
| 194 permission_report.persisted()); | 194 permission_report.persisted()); |
| 195 EXPECT_EQ(0, permission_report.num_prior_dismissals()); | 195 EXPECT_EQ(0, permission_report.num_prior_dismissals()); |
| 196 // Ensure that we correctly record one prior ignore. | 196 // Ensure that we correctly record one prior ignore. |
| 197 EXPECT_EQ(1, permission_report.num_prior_ignores()); | 197 EXPECT_EQ(1, permission_report.num_prior_ignores()); |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace safe_browsing | 200 } // namespace safe_browsing |
| OLD | NEW |