OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This test creates a fake safebrowsing service, where we can inject known- | 5 // This test creates a fake safebrowsing service, where we can inject known- |
6 // threat urls. It then uses a real browser to go to these urls, and sends | 6 // threat urls. It then uses a real browser to go to these urls, and sends |
7 // "goback" or "proceed" commands and verifies they work. | 7 // "goback" or "proceed" commands and verifies they work. |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/macros.h" |
13 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
14 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
16 #include "base/test/histogram_tester.h" | 17 #include "base/test/histogram_tester.h" |
17 #include "base/values.h" | 18 #include "base/values.h" |
| 19 #include "build/build_config.h" |
18 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
19 #include "chrome/browser/interstitials/security_interstitial_page_test_utils.h" | 21 #include "chrome/browser/interstitials/security_interstitial_page_test_utils.h" |
20 #include "chrome/browser/net/url_request_mock_util.h" | 22 #include "chrome/browser/net/url_request_mock_util.h" |
21 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/safe_browsing/database_manager.h" | 24 #include "chrome/browser/safe_browsing/database_manager.h" |
23 #include "chrome/browser/safe_browsing/local_database_manager.h" | 25 #include "chrome/browser/safe_browsing/local_database_manager.h" |
24 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 26 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
25 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 27 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
26 #include "chrome/browser/safe_browsing/safe_browsing_util.h" | 28 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
27 #include "chrome/browser/safe_browsing/test_database_manager.h" | 29 #include "chrome/browser/safe_browsing/test_database_manager.h" |
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 | 1138 |
1137 INSTANTIATE_TEST_CASE_P( | 1139 INSTANTIATE_TEST_CASE_P( |
1138 SafeBrowsingBlockingPageIDNTestWithThreatType, | 1140 SafeBrowsingBlockingPageIDNTestWithThreatType, |
1139 SafeBrowsingBlockingPageIDNTest, | 1141 SafeBrowsingBlockingPageIDNTest, |
1140 testing::Combine(testing::Values(false, true), | 1142 testing::Combine(testing::Values(false, true), |
1141 testing::Values(SB_THREAT_TYPE_URL_MALWARE, | 1143 testing::Values(SB_THREAT_TYPE_URL_MALWARE, |
1142 SB_THREAT_TYPE_URL_PHISHING, | 1144 SB_THREAT_TYPE_URL_PHISHING, |
1143 SB_THREAT_TYPE_URL_UNWANTED))); | 1145 SB_THREAT_TYPE_URL_UNWANTED))); |
1144 | 1146 |
1145 } // namespace safe_browsing | 1147 } // namespace safe_browsing |
OLD | NEW |