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

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

Issue 2603433002: Move SecurityInterstitialPage into component (Closed)
Patch Set: missed some changes in rebase Created 3 years, 11 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 (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
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 SB_THREAT_TYPE_URL_UNWANTED), 1321 SB_THREAT_TYPE_URL_UNWANTED),
1322 testing::Bool())); // If isolate all sites for testing. 1322 testing::Bool())); // If isolate all sites for testing.
1323 1323
1324 // Test that SafeBrowsingBlockingPage properly decodes IDN URLs that are 1324 // Test that SafeBrowsingBlockingPage properly decodes IDN URLs that are
1325 // displayed. 1325 // displayed.
1326 class SafeBrowsingBlockingPageIDNTest 1326 class SafeBrowsingBlockingPageIDNTest
1327 : public SecurityInterstitialIDNTest, 1327 : public SecurityInterstitialIDNTest,
1328 public testing::WithParamInterface<testing::tuple<bool, SBThreatType>> { 1328 public testing::WithParamInterface<testing::tuple<bool, SBThreatType>> {
1329 protected: 1329 protected:
1330 // SecurityInterstitialIDNTest implementation 1330 // SecurityInterstitialIDNTest implementation
1331 SecurityInterstitialPage* CreateInterstitial( 1331 security_interstitials::SecurityInterstitialPage* CreateInterstitial(
1332 content::WebContents* contents, 1332 content::WebContents* contents,
1333 const GURL& request_url) const override { 1333 const GURL& request_url) const override {
1334 SafeBrowsingUIManager::CreateWhitelistForTesting(contents); 1334 SafeBrowsingUIManager::CreateWhitelistForTesting(contents);
1335 const bool is_subresource = testing::get<0>(GetParam()); 1335 const bool is_subresource = testing::get<0>(GetParam());
1336 1336
1337 SafeBrowsingService* sb_service = 1337 SafeBrowsingService* sb_service =
1338 g_browser_process->safe_browsing_service(); 1338 g_browser_process->safe_browsing_service();
1339 SafeBrowsingBlockingPage::UnsafeResource resource; 1339 SafeBrowsingBlockingPage::UnsafeResource resource;
1340 1340
1341 resource.url = request_url; 1341 resource.url = request_url;
(...skipping 19 matching lines...) Expand all
1361 1361
1362 INSTANTIATE_TEST_CASE_P( 1362 INSTANTIATE_TEST_CASE_P(
1363 SafeBrowsingBlockingPageIDNTestWithThreatType, 1363 SafeBrowsingBlockingPageIDNTestWithThreatType,
1364 SafeBrowsingBlockingPageIDNTest, 1364 SafeBrowsingBlockingPageIDNTest,
1365 testing::Combine(testing::Values(false, true), 1365 testing::Combine(testing::Values(false, true),
1366 testing::Values(SB_THREAT_TYPE_URL_MALWARE, 1366 testing::Values(SB_THREAT_TYPE_URL_MALWARE,
1367 SB_THREAT_TYPE_URL_PHISHING, 1367 SB_THREAT_TYPE_URL_PHISHING,
1368 SB_THREAT_TYPE_URL_UNWANTED))); 1368 SB_THREAT_TYPE_URL_UNWANTED)));
1369 1369
1370 } // namespace safe_browsing 1370 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698