| 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/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 12 #include "base/values.h" | 13 #include "base/values.h" |
| 13 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/prefs/pref_service.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" |
| 23 #include "chrome/browser/ui/browser_tabstrip.h" | 23 #include "chrome/browser/ui/browser_tabstrip.h" |
| 24 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 24 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); | 781 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); |
| 782 | 782 |
| 783 EXPECT_TRUE(ClickAndWaitForDetach("learn-more-link")); | 783 EXPECT_TRUE(ClickAndWaitForDetach("learn-more-link")); |
| 784 AssertNoInterstitial(false); // Assert the interstitial is gone | 784 AssertNoInterstitial(false); // Assert the interstitial is gone |
| 785 | 785 |
| 786 // We are in the help page. | 786 // We are in the help page. |
| 787 EXPECT_EQ( | 787 EXPECT_EQ( |
| 788 "/goodtoknow/online-safety/phishing/", | 788 "/goodtoknow/online-safety/phishing/", |
| 789 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path()); | 789 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path()); |
| 790 } | 790 } |
| OLD | NEW |