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" |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 EXPECT_EQ(VISIBLE, GetVisibility("report-error-link")); | 785 EXPECT_EQ(VISIBLE, GetVisibility("report-error-link")); |
786 EXPECT_EQ(VISIBLE, GetVisibility("proceed")); | 786 EXPECT_EQ(VISIBLE, GetVisibility("proceed")); |
787 | 787 |
788 EXPECT_TRUE(ClickAndWaitForDetach("back")); | 788 EXPECT_TRUE(ClickAndWaitForDetach("back")); |
789 AssertNoInterstitial(false); // Assert the interstitial is gone | 789 AssertNoInterstitial(false); // Assert the interstitial is gone |
790 EXPECT_EQ( | 790 EXPECT_EQ( |
791 GURL(content::kAboutBlankURL), // We are back to "about:blank". | 791 GURL(content::kAboutBlankURL), // We are back to "about:blank". |
792 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); | 792 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); |
793 } | 793 } |
794 | 794 |
795 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, PhishingProceed) { | 795 // http://crbug.com/247763 |
| 796 #if defined(OS_WIN) |
| 797 #define MAYBE_PhishingProceed DISABLED_PhishingProceed |
| 798 #else |
| 799 #define MAYBE_PhishingProceed PhishingProceed |
| 800 #endif |
| 801 |
| 802 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, MAYBE_PhishingProceed) { |
796 GURL url = SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); | 803 GURL url = SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); |
797 | 804 |
798 EXPECT_TRUE(ClickAndWaitForDetach("proceed")); | 805 EXPECT_TRUE(ClickAndWaitForDetach("proceed")); |
799 AssertNoInterstitial(true); // Assert the interstitial is gone | 806 AssertNoInterstitial(true); // Assert the interstitial is gone |
800 EXPECT_EQ(url, | 807 EXPECT_EQ(url, |
801 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); | 808 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); |
802 } | 809 } |
803 | 810 |
804 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, PhishingReportError) { | 811 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, PhishingReportError) { |
805 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); | 812 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); |
(...skipping 11 matching lines...) Expand all Loading... |
817 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); | 824 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); |
818 | 825 |
819 EXPECT_TRUE(ClickAndWaitForDetach("learn-more-link")); | 826 EXPECT_TRUE(ClickAndWaitForDetach("learn-more-link")); |
820 AssertNoInterstitial(false); // Assert the interstitial is gone | 827 AssertNoInterstitial(false); // Assert the interstitial is gone |
821 | 828 |
822 // We are in the help page. | 829 // We are in the help page. |
823 EXPECT_EQ( | 830 EXPECT_EQ( |
824 "/goodtoknow/online-safety/phishing/", | 831 "/goodtoknow/online-safety/phishing/", |
825 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path()); | 832 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path()); |
826 } | 833 } |
OLD | NEW |