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 safebrowsing service using test safebrowsing database | 5 // This test creates a safebrowsing service using test safebrowsing database |
6 // and a test protocol manager. It is used to test logics in safebrowsing | 6 // and a test protocol manager. It is used to test logics in safebrowsing |
7 // service. | 7 // service. |
8 | 8 |
9 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 9 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
10 | 10 |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 // This test will fill up the database using testing prefixes | 538 // This test will fill up the database using testing prefixes |
539 // and urls. | 539 // and urls. |
540 command_line->AppendSwitch(safe_browsing::switches::kSbDisableAutoUpdate); | 540 command_line->AppendSwitch(safe_browsing::switches::kSbDisableAutoUpdate); |
541 #if defined(OS_CHROMEOS) | 541 #if defined(OS_CHROMEOS) |
542 command_line->AppendSwitch( | 542 command_line->AppendSwitch( |
543 chromeos::switches::kIgnoreUserProfileMappingForTests); | 543 chromeos::switches::kIgnoreUserProfileMappingForTests); |
544 #endif | 544 #endif |
545 } | 545 } |
546 | 546 |
547 void SetUpOnMainThread() override { | 547 void SetUpOnMainThread() override { |
548 InProcessBrowserTest::SetUpOnMainThread(); | |
549 g_browser_process->safe_browsing_service()->ui_manager()->AddObserver( | 548 g_browser_process->safe_browsing_service()->ui_manager()->AddObserver( |
550 &observer_); | 549 &observer_); |
551 } | 550 } |
552 | 551 |
553 void TearDownOnMainThread() override { | 552 void TearDownOnMainThread() override { |
554 g_browser_process->safe_browsing_service()->ui_manager()->RemoveObserver( | 553 g_browser_process->safe_browsing_service()->ui_manager()->RemoveObserver( |
555 &observer_); | 554 &observer_); |
556 InProcessBrowserTest::TearDownOnMainThread(); | 555 InProcessBrowserTest::TearDownOnMainThread(); |
557 } | 556 } |
558 | 557 |
(...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2356 } | 2355 } |
2357 | 2356 |
2358 INSTANTIATE_TEST_CASE_P( | 2357 INSTANTIATE_TEST_CASE_P( |
2359 MaybeSetMetadata, | 2358 MaybeSetMetadata, |
2360 V4SafeBrowsingServiceMetadataTest, | 2359 V4SafeBrowsingServiceMetadataTest, |
2361 testing::Values(ThreatPatternType::NONE, | 2360 testing::Values(ThreatPatternType::NONE, |
2362 ThreatPatternType::MALWARE_LANDING, | 2361 ThreatPatternType::MALWARE_LANDING, |
2363 ThreatPatternType::MALWARE_DISTRIBUTION)); | 2362 ThreatPatternType::MALWARE_DISTRIBUTION)); |
2364 | 2363 |
2365 } // namespace safe_browsing | 2364 } // namespace safe_browsing |
OLD | NEW |