OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ui_manager.h" | 5 #include "chrome/browser/safe_browsing/ui_manager.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 8 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
9 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 9 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
10 #include "chrome/browser/safe_browsing/ui_manager.h" | 10 #include "chrome/browser/safe_browsing/ui_manager.h" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 main_frame_url, | 345 main_frame_url, |
346 unsafe_resources, | 346 unsafe_resources, |
347 SafeBrowsingErrorUI::SBErrorDisplayOptions( | 347 SafeBrowsingErrorUI::SBErrorDisplayOptions( |
348 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), | 348 BaseBlockingPage::IsMainPageLoadBlocked(unsafe_resources), |
349 false, | 349 false, |
350 false, | 350 false, |
351 false, | 351 false, |
352 false, | 352 false, |
353 false)) { | 353 false)) { |
354 // Don't delay details at all for the unittest. | 354 // Don't delay details at all for the unittest. |
355 threat_details_proceed_delay_ms_ = 0; | 355 SetThreatDetailsProceedDelayForTesting(0); |
356 DontCreateViewForTesting(); | 356 DontCreateViewForTesting(); |
357 } | 357 } |
358 }; | 358 }; |
359 | 359 |
360 // A factory that creates TestSafeBrowsingBlockingPages. | 360 // A factory that creates TestSafeBrowsingBlockingPages. |
361 class TestSafeBrowsingBlockingPageFactory | 361 class TestSafeBrowsingBlockingPageFactory |
362 : public SafeBrowsingBlockingPageFactory { | 362 : public SafeBrowsingBlockingPageFactory { |
363 public: | 363 public: |
364 TestSafeBrowsingBlockingPageFactory() {} | 364 TestSafeBrowsingBlockingPageFactory() {} |
365 ~TestSafeBrowsingBlockingPageFactory() override {} | 365 ~TestSafeBrowsingBlockingPageFactory() override {} |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 SimulateBlockingPageDone(resources, true); | 413 SimulateBlockingPageDone(resources, true); |
414 EXPECT_TRUE(delegate.visible_security_state_changed()); | 414 EXPECT_TRUE(delegate.visible_security_state_changed()); |
415 | 415 |
416 waiter.WaitForCallback(); | 416 waiter.WaitForCallback(); |
417 EXPECT_TRUE(waiter.callback_called()); | 417 EXPECT_TRUE(waiter.callback_called()); |
418 EXPECT_TRUE(waiter.proceed()); | 418 EXPECT_TRUE(waiter.proceed()); |
419 EXPECT_TRUE(IsWhitelisted(resource)); | 419 EXPECT_TRUE(IsWhitelisted(resource)); |
420 } | 420 } |
421 | 421 |
422 } // namespace safe_browsing | 422 } // namespace safe_browsing |
OLD | NEW |