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 |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 } | 328 } |
329 | 329 |
330 void TearDown() override { | 330 void TearDown() override { |
331 InProcessBrowserTest::TearDown(); | 331 InProcessBrowserTest::TearDown(); |
332 SafeBrowsingBlockingPage::RegisterFactory(NULL); | 332 SafeBrowsingBlockingPage::RegisterFactory(NULL); |
333 SafeBrowsingService::RegisterFactory(NULL); | 333 SafeBrowsingService::RegisterFactory(NULL); |
334 ThreatDetails::RegisterFactory(NULL); | 334 ThreatDetails::RegisterFactory(NULL); |
335 } | 335 } |
336 | 336 |
337 void SetUpCommandLine(base::CommandLine* command_line) override { | 337 void SetUpCommandLine(base::CommandLine* command_line) override { |
338 command_line->AppendSwitchASCII( | 338 command_line->AppendSwitchASCII("enable-features", |
339 "enable-features", | 339 "ThreatDomDetailsTagAttributes<SBDomStudy"); |
340 "FillDOMInThreatDetails,ThreatDomDetailsTagAttributes<SBDomStudy"); | |
341 command_line->AppendSwitchASCII("force-fieldtrials", | 340 command_line->AppendSwitchASCII("force-fieldtrials", |
342 "SBDomStudy/SBDomGroup"); | 341 "SBDomStudy/SBDomGroup"); |
343 command_line->AppendSwitchASCII( | 342 command_line->AppendSwitchASCII( |
344 "force-fieldtrial-params", | 343 "force-fieldtrial-params", |
345 "SBDomStudy.SBDomGroup:tag_attribute_csv/div%2Cfoo%2Cdiv%2Cbaz"); | 344 "SBDomStudy.SBDomGroup:tag_attribute_csv/div%2Cfoo%2Cdiv%2Cbaz"); |
346 | 345 |
347 if (testing::get<1>(GetParam())) | 346 if (testing::get<1>(GetParam())) |
348 content::IsolateAllSitesForTesting(command_line); | 347 content::IsolateAllSitesForTesting(command_line); |
349 } | 348 } |
350 | 349 |
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1435 | 1434 |
1436 INSTANTIATE_TEST_CASE_P( | 1435 INSTANTIATE_TEST_CASE_P( |
1437 SafeBrowsingBlockingPageIDNTestWithThreatType, | 1436 SafeBrowsingBlockingPageIDNTestWithThreatType, |
1438 SafeBrowsingBlockingPageIDNTest, | 1437 SafeBrowsingBlockingPageIDNTest, |
1439 testing::Combine(testing::Values(false, true), | 1438 testing::Combine(testing::Values(false, true), |
1440 testing::Values(SB_THREAT_TYPE_URL_MALWARE, | 1439 testing::Values(SB_THREAT_TYPE_URL_MALWARE, |
1441 SB_THREAT_TYPE_URL_PHISHING, | 1440 SB_THREAT_TYPE_URL_PHISHING, |
1442 SB_THREAT_TYPE_URL_UNWANTED))); | 1441 SB_THREAT_TYPE_URL_UNWANTED))); |
1443 | 1442 |
1444 } // namespace safe_browsing | 1443 } // namespace safe_browsing |
OLD | NEW |