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 | 5 // This test creates a fake safebrowsing service, where we can inject |
6 // malware and phishing urls. It then uses a real browser to go to | 6 // malware and phishing urls. It then uses a real browser to go to |
7 // these urls, and sends "goback" or "proceed" commands and verifies | 7 // these urls, and sends "goback" or "proceed" commands and verifies |
8 // they work. | 8 // they work. |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/safe_browsing/database_manager.h" | 16 #include "chrome/browser/safe_browsing/database_manager.h" |
17 #include "chrome/browser/safe_browsing/malware_details.h" | 17 #include "chrome/browser/safe_browsing/malware_details.h" |
18 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 18 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
19 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 19 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
20 #include "chrome/browser/safe_browsing/safe_browsing_util.h" | 20 #include "chrome/browser/safe_browsing/safe_browsing_util.h" |
21 #include "chrome/browser/safe_browsing/ui_manager.h" | 21 #include "chrome/browser/safe_browsing/ui_manager.h" |
22 #include "chrome/browser/ui/browser.h" | 22 #include "chrome/browser/ui/browser.h" |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); | 817 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); |
818 | 818 |
819 EXPECT_TRUE(ClickAndWaitForDetach("learn-more-link")); | 819 EXPECT_TRUE(ClickAndWaitForDetach("learn-more-link")); |
820 AssertNoInterstitial(false); // Assert the interstitial is gone | 820 AssertNoInterstitial(false); // Assert the interstitial is gone |
821 | 821 |
822 // We are in the help page. | 822 // We are in the help page. |
823 EXPECT_EQ( | 823 EXPECT_EQ( |
824 "/goodtoknow/online-safety/phishing/", | 824 "/goodtoknow/online-safety/phishing/", |
825 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path()); | 825 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path()); |
826 } | 826 } |
OLD | NEW |