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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, MalwareIframeProceed) { | 700 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, MalwareIframeProceed) { |
701 GURL url = SetupMalwareIframeWarningAndNavigate(); | 701 GURL url = SetupMalwareIframeWarningAndNavigate(); |
702 | 702 |
703 EXPECT_TRUE(ClickAndWaitForDetach("proceed")); | 703 EXPECT_TRUE(ClickAndWaitForDetach("proceed")); |
704 AssertNoInterstitial(true); // Assert the interstitial is gone | 704 AssertNoInterstitial(true); // Assert the interstitial is gone |
705 | 705 |
706 EXPECT_EQ(url, | 706 EXPECT_EQ(url, |
707 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); | 707 browser()->tab_strip_model()->GetActiveWebContents()->GetURL()); |
708 } | 708 } |
709 | 709 |
710 // Disabled on Win Aura because it is flaky: crbug.com/273302. | 710 IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, |
711 #if defined(OS_WIN) && defined(USE_AURA) | |
712 #define MAYBE_SafeBrowsingBlockingPageTest DISABLED_SafeBrowsingBlockingPageTest | |
713 #else | |
714 #define MAYBE_SafeBrowsingBlockingPageTest SafeBrowsingBlockingPageTest | |
715 #endif | |
716 IN_PROC_BROWSER_TEST_F(MAYBE_SafeBrowsingBlockingPageTest, | |
717 MalwareIframeReportDetails) { | 711 MalwareIframeReportDetails) { |
718 GURL url = SetupMalwareIframeWarningAndNavigate(); | 712 GURL url = SetupMalwareIframeWarningAndNavigate(); |
719 | 713 |
720 // If the DOM details from renderer did not already return, wait for them. | 714 // If the DOM details from renderer did not already return, wait for them. |
721 details_factory_.get_details()->WaitForDOM(); | 715 details_factory_.get_details()->WaitForDOM(); |
722 | 716 |
723 EXPECT_TRUE(Click("check-report")); | 717 EXPECT_TRUE(Click("check-report")); |
724 | 718 |
725 EXPECT_TRUE(ClickAndWaitForDetach("proceed")); | 719 EXPECT_TRUE(ClickAndWaitForDetach("proceed")); |
726 AssertNoInterstitial(true); // Assert the interstitial is gone | 720 AssertNoInterstitial(true); // Assert the interstitial is gone |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); | 863 SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING); |
870 | 864 |
871 EXPECT_TRUE(ClickAndWaitForDetach("learn-more-link")); | 865 EXPECT_TRUE(ClickAndWaitForDetach("learn-more-link")); |
872 AssertNoInterstitial(false); // Assert the interstitial is gone | 866 AssertNoInterstitial(false); // Assert the interstitial is gone |
873 | 867 |
874 // We are in the help page. | 868 // We are in the help page. |
875 EXPECT_EQ( | 869 EXPECT_EQ( |
876 "/goodtoknow/online-safety/phishing/", | 870 "/goodtoknow/online-safety/phishing/", |
877 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path()); | 871 browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path()); |
878 } | 872 } |
OLD | NEW |