| 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 #include <list> | 5 #include <list> |
| 6 | 6 |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "chrome/browser/interstitials/chrome_controller_client.h" | 8 #include "chrome/browser/interstitials/chrome_controller_client.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 10 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 WebContents* web_contents, | 48 WebContents* web_contents, |
| 49 const GURL& main_frame_url, | 49 const GURL& main_frame_url, |
| 50 const UnsafeResourceList& unsafe_resources, | 50 const UnsafeResourceList& unsafe_resources, |
| 51 const SafeBrowsingErrorUI::SBErrorDisplayOptions& display_options) | 51 const SafeBrowsingErrorUI::SBErrorDisplayOptions& display_options) |
| 52 : SafeBrowsingBlockingPage(manager, | 52 : SafeBrowsingBlockingPage(manager, |
| 53 web_contents, | 53 web_contents, |
| 54 main_frame_url, | 54 main_frame_url, |
| 55 unsafe_resources, | 55 unsafe_resources, |
| 56 display_options) { | 56 display_options) { |
| 57 // Don't delay details at all for the unittest. | 57 // Don't delay details at all for the unittest. |
| 58 threat_details_proceed_delay_ms_ = 0; | 58 SetThreatDetailsProceedDelayForTesting(0); |
| 59 DontCreateViewForTesting(); | 59 DontCreateViewForTesting(); |
| 60 } | 60 } |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 class TestSafeBrowsingBlockingPageFactory | 63 class TestSafeBrowsingBlockingPageFactory |
| 64 : public SafeBrowsingBlockingPageFactory { | 64 : public SafeBrowsingBlockingPageFactory { |
| 65 public: | 65 public: |
| 66 TestSafeBrowsingBlockingPageFactory() { } | 66 TestSafeBrowsingBlockingPageFactory() { } |
| 67 ~TestSafeBrowsingBlockingPageFactory() override {} | 67 ~TestSafeBrowsingBlockingPageFactory() override {} |
| 68 | 68 |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 // The interstitial should be gone. | 771 // The interstitial should be gone. |
| 772 EXPECT_EQ(CANCEL, user_response()); | 772 EXPECT_EQ(CANCEL, user_response()); |
| 773 EXPECT_FALSE(GetSafeBrowsingBlockingPage()); | 773 EXPECT_FALSE(GetSafeBrowsingBlockingPage()); |
| 774 | 774 |
| 775 // No report should have been sent. | 775 // No report should have been sent. |
| 776 EXPECT_EQ(0u, ui_manager_->GetThreatDetails()->size()); | 776 EXPECT_EQ(0u, ui_manager_->GetThreatDetails()->size()); |
| 777 ui_manager_->GetThreatDetails()->clear(); | 777 ui_manager_->GetThreatDetails()->clear(); |
| 778 } | 778 } |
| 779 | 779 |
| 780 } // namespace safe_browsing | 780 } // namespace safe_browsing |
| OLD | NEW |