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" |
11 #include "chrome/browser/safe_browsing/test_safe_browsing_service.h" | 11 #include "chrome/browser/safe_browsing/test_safe_browsing_service.h" |
12 #include "chrome/browser/safe_browsing/ui_manager.h" | 12 #include "chrome/browser/safe_browsing/ui_manager.h" |
13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
14 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 14 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
15 #include "chrome/test/base/testing_browser_process.h" | 15 #include "chrome/test/base/testing_browser_process.h" |
16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
17 #include "components/prefs/pref_service.h" | 17 #include "components/prefs/pref_service.h" |
18 #include "components/safe_browsing/browser/threat_details.h" | 18 #include "components/safe_browsing/browser/threat_details.h" |
19 #include "components/safe_browsing_db/safe_browsing_prefs.h" | 19 #include "components/safe_browsing/common/safe_browsing_prefs.h" |
20 #include "content/public/browser/interstitial_page.h" | 20 #include "content/public/browser/interstitial_page.h" |
21 #include "content/public/browser/navigation_entry.h" | 21 #include "content/public/browser/navigation_entry.h" |
22 #include "content/public/browser/render_process_host.h" | 22 #include "content/public/browser/render_process_host.h" |
23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
24 #include "content/public/test/web_contents_tester.h" | 24 #include "content/public/test/web_contents_tester.h" |
25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 | 27 |
28 using content::InterstitialPage; | 28 using content::InterstitialPage; |
29 using content::NavigationEntry; | 29 using content::NavigationEntry; |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 // The interstitial should be gone. | 789 // The interstitial should be gone. |
790 EXPECT_EQ(CANCEL, user_response()); | 790 EXPECT_EQ(CANCEL, user_response()); |
791 EXPECT_FALSE(GetSafeBrowsingBlockingPage()); | 791 EXPECT_FALSE(GetSafeBrowsingBlockingPage()); |
792 | 792 |
793 // No report should have been sent. | 793 // No report should have been sent. |
794 EXPECT_EQ(0u, ui_manager_->GetThreatDetails()->size()); | 794 EXPECT_EQ(0u, ui_manager_->GetThreatDetails()->size()); |
795 ui_manager_->GetThreatDetails()->clear(); | 795 ui_manager_->GetThreatDetails()->clear(); |
796 } | 796 } |
797 | 797 |
798 } // namespace safe_browsing | 798 } // namespace safe_browsing |
OLD | NEW |