}
virtual void DidAttachInterstitialPage() OVERRIDE {
- LOG(INFO) << __FUNCTION__;
attach_callback_.Run();
}
virtual void DidDetachInterstitialPage() OVERRIDE {
- LOG(INFO) << __FUNCTION__;
detach_callback_.Run();
}
void WaitForDOM() {
if (got_dom_) {
- LOG(INFO) << "Already got the dom details.";
return;
}
// This condition might not trigger normally, but if you add a
// sleep(1) in malware_dom_details it triggers :).
waiting_ = true;
- LOG(INFO) << "Waiting for dom details.";
content::RunMessageLoop();
EXPECT_TRUE(got_dom_);
}
};
// A SafeBrowingBlockingPage class that lets us wait until it's hidden.
-class TestSafeBrowsingBlockingPage : public SafeBrowsingBlockingPageV2 {
+class TestSafeBrowsingBlockingPage : public SafeBrowsingBlockingPage {
public:
TestSafeBrowsingBlockingPage(SafeBrowsingUIManager* manager,
- WebContents* web_contents,
- const UnsafeResourceList& unsafe_resources)
- : SafeBrowsingBlockingPageV2(manager, web_contents, unsafe_resources),
+ WebContents* web_contents,
+ const UnsafeResourceList& unsafe_resources)
+ : SafeBrowsingBlockingPage(manager, web_contents, unsafe_resources),
wait_for_delete_(false) {
// Don't wait the whole 3 seconds for the browser test.
malware_details_proceed_delay_ms_ = 100;
}
virtual ~TestSafeBrowsingBlockingPage() {
- LOG(INFO) << __FUNCTION__;
if (!wait_for_delete_)
return;
}
void WaitForDelete() {
- LOG(INFO) << __FUNCTION__;
wait_for_delete_ = true;
content::RunMessageLoop();
}
// InterstitialPageDelegate methods:
virtual void CommandReceived(const std::string& command) OVERRIDE {
- LOG(INFO) << __FUNCTION__ << " " << command;
- SafeBrowsingBlockingPageV2::CommandReceived(command);
+ SafeBrowsingBlockingPage::CommandReceived(command);
}
virtual void OnProceed() OVERRIDE {
- LOG(INFO) << __FUNCTION__;
- SafeBrowsingBlockingPageV2::OnProceed();
+ SafeBrowsingBlockingPage::OnProceed();
}
virtual void OnDontProceed() OVERRIDE {
- LOG(INFO) << __FUNCTION__;
- SafeBrowsingBlockingPageV2::OnDontProceed();
+ SafeBrowsingBlockingPage::OnDontProceed();
}
private:
const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources)
OVERRIDE {
return new TestSafeBrowsingBlockingPage(delegate, web_contents,
- unsafe_resources);
+ unsafe_resources);
}
};
} // namespace
// Tests the safe browsing blocking page in a browser.
-class SafeBrowsingBlockingPageTest : public InProcessBrowserTest {
+class SafeBrowsingBlockingPageBrowserTest
+ : public InProcessBrowserTest,
+ public testing::WithParamInterface<int> {
public:
enum Visibility {
VISIBILITY_ERROR = -1,
HIDDEN = 0,
- VISIBLE = 1,
+ VISIBLE = 1
};
- SafeBrowsingBlockingPageTest() {
+ SafeBrowsingBlockingPageBrowserTest() {
}
virtual void SetUp() OVERRIDE {
GURL iframe_url = test_server()->GetURL(kMalwareIframe);
SetURLThreatType(iframe_url, SB_THREAT_TYPE_URL_MALWARE);
- LOG(INFO) << "navigating... " << url.spec();
ui_test_utils::NavigateToURL(browser(), url);
EXPECT_TRUE(WaitForReady());
return url;
}
void SetReportSentCallback(const base::Closure& callback) {
- LOG(INFO) << __FUNCTION__;
factory_.most_recent_service()
->fake_ui_manager()
->set_malware_details_done_callback(callback);
}
std::string GetReportSent() {
- LOG(INFO) << __FUNCTION__;
return factory_.most_recent_service()->fake_ui_manager()->GetReport();
}
}
bool WaitForReady() {
- LOG(INFO) << __FUNCTION__;
content::RenderViewHost* rvh = GetRenderViewHost();
if (!rvh)
return false;
if (!value.get() || !value->GetAsString(&ready_state))
return false;
} while (ready_state != "complete");
- LOG(INFO) << "done waiting";
return true;
}
}
bool Click(const std::string& node_id) {
- LOG(INFO) << "Click " << node_id;
content::RenderViewHost* rvh = GetRenderViewHost();
if (!rvh)
return false;
TestSafeBrowsingServiceFactory factory_;
TestSafeBrowsingBlockingPageFactory blocking_page_factory_;
- DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPageTest);
+ DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPageBrowserTest);
};
// TODO(linux_aura) http://crbug.com/163931
#else
#define MAYBE_MalwareRedirectInIFrameCanceled MalwareRedirectInIFrameCanceled
#endif
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest,
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest,
MAYBE_MalwareRedirectInIFrameCanceled) {
// 1. Test the case that redirect is a subresource.
MalwareRedirectCancelAndProceed("openWinIFrame");
AssertNoInterstitial(true);
}
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest,
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest,
MalwareRedirectCanceled) {
// 2. Test the case that redirect is the only resource.
MalwareRedirectCancelAndProceed("openWin");
EXPECT_TRUE(YesInterstitial());
}
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, MalwareDontProceed) {
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest,
+ MalwareDontProceed) {
#if defined(OS_WIN) && defined(USE_ASH)
// Disable this test in Metro+Ash for now (http://crbug.com/262796).
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
SetupWarningAndNavigate(SB_THREAT_TYPE_URL_MALWARE);
- EXPECT_EQ(VISIBLE, GetVisibility("malware-icon"));
- EXPECT_EQ(HIDDEN, GetVisibility("subresource-icon"));
- EXPECT_EQ(HIDDEN, GetVisibility("phishing-icon"));
- EXPECT_EQ(VISIBLE, GetVisibility("check-report"));
- EXPECT_EQ(HIDDEN, GetVisibility("show-diagnostic-link"));
- EXPECT_EQ(HIDDEN, GetVisibility("report-error-link"));
- EXPECT_EQ(HIDDEN, GetVisibility("proceed"));
- EXPECT_TRUE(Click("see-more-link"));
- EXPECT_EQ(VISIBLE, GetVisibility("show-diagnostic-link"));
- EXPECT_EQ(HIDDEN, GetVisibility("report-error-link"));
- EXPECT_EQ(VISIBLE, GetVisibility("proceed"));
-
- EXPECT_TRUE(ClickAndWaitForDetach("back"));
+ EXPECT_EQ(VISIBLE, GetVisibility("primary-button"));
+ EXPECT_EQ(HIDDEN, GetVisibility("details"));
+ EXPECT_EQ(HIDDEN, GetVisibility("proceed-link"));
+ EXPECT_EQ(HIDDEN, GetVisibility("error-code"));
+ EXPECT_TRUE(Click("details-button"));
+ EXPECT_EQ(VISIBLE, GetVisibility("details"));
+ EXPECT_EQ(VISIBLE, GetVisibility("proceed-link"));
+ EXPECT_EQ(HIDDEN, GetVisibility("error-code"));
+ EXPECT_TRUE(ClickAndWaitForDetach("primary-button"));
+
AssertNoInterstitial(false); // Assert the interstitial is gone
- EXPECT_EQ(
- GURL(content::kAboutBlankURL), // Back to "about:blank"
- browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
+ EXPECT_EQ(GURL(url::kAboutBlankURL), // Back to "about:blank"
+ browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
+}
+
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest,
+ HarmfulDontProceed) {
+#if defined(OS_WIN) && defined(USE_ASH)
+ // Disable this test in Metro+Ash for now (http://crbug.com/262796).
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
+ return;
+#endif
+
+ SetupWarningAndNavigate(SB_THREAT_TYPE_URL_HARMFUL);
+
+ EXPECT_EQ(VISIBLE, GetVisibility("primary-button"));
+ EXPECT_EQ(HIDDEN, GetVisibility("details"));
+ EXPECT_EQ(HIDDEN, GetVisibility("proceed-link"));
+ EXPECT_EQ(HIDDEN, GetVisibility("error-code"));
+ EXPECT_TRUE(Click("details-button"));
+ EXPECT_EQ(VISIBLE, GetVisibility("details"));
+ EXPECT_EQ(VISIBLE, GetVisibility("proceed-link"));
+ EXPECT_EQ(HIDDEN, GetVisibility("error-code"));
+ EXPECT_TRUE(ClickAndWaitForDetach("primary-button"));
+
+ AssertNoInterstitial(false); // Assert the interstitial is gone
+ EXPECT_EQ(GURL(url::kAboutBlankURL), // Back to "about:blank"
+ browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
}
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, MalwareProceed) {
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest, MalwareProceed) {
GURL url = SetupWarningAndNavigate(SB_THREAT_TYPE_URL_MALWARE);
- EXPECT_TRUE(ClickAndWaitForDetach("proceed"));
+ EXPECT_TRUE(ClickAndWaitForDetach("proceed-link"));
AssertNoInterstitial(true); // Assert the interstitial is gone.
EXPECT_EQ(url,
browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
}
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest,
- MalwareLearnMore) {
- SetupWarningAndNavigate(SB_THREAT_TYPE_URL_MALWARE);
-
- EXPECT_TRUE(ClickAndWaitForDetach("learn-more-link"));
- AssertNoInterstitial(false); // Assert the interstitial is gone
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest, HarmfulProceed) {
+ GURL url = SetupWarningAndNavigate(SB_THREAT_TYPE_URL_HARMFUL);
- // We are in the help page.
- EXPECT_EQ(
- "/transparencyreport/safebrowsing/",
- browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path());
+ EXPECT_TRUE(ClickAndWaitForDetach("proceed-link"));
+ AssertNoInterstitial(true); // Assert the interstitial is gone.
+ EXPECT_EQ(url,
+ browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
}
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest,
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest,
MalwareIframeDontProceed) {
#if defined(OS_WIN) && defined(USE_ASH)
// Disable this test in Metro+Ash for now (http://crbug.com/262796).
SetupMalwareIframeWarningAndNavigate();
- EXPECT_EQ(HIDDEN, GetVisibility("malware-icon"));
- EXPECT_EQ(VISIBLE, GetVisibility("subresource-icon"));
- EXPECT_EQ(HIDDEN, GetVisibility("phishing-icon"));
- EXPECT_EQ(VISIBLE, GetVisibility("check-report"));
- EXPECT_EQ(HIDDEN, GetVisibility("show-diagnostic-link"));
- EXPECT_EQ(HIDDEN, GetVisibility("report-error-link"));
- EXPECT_EQ(HIDDEN, GetVisibility("proceed"));
- EXPECT_TRUE(Click("see-more-link"));
- EXPECT_EQ(VISIBLE, GetVisibility("show-diagnostic-link"));
- EXPECT_EQ(HIDDEN, GetVisibility("report-error-link"));
- EXPECT_EQ(VISIBLE, GetVisibility("proceed"));
-
- EXPECT_TRUE(ClickAndWaitForDetach("back"));
+ EXPECT_EQ(VISIBLE, GetVisibility("primary-button"));
+ EXPECT_EQ(HIDDEN, GetVisibility("details"));
+ EXPECT_EQ(HIDDEN, GetVisibility("proceed-link"));
+ EXPECT_EQ(HIDDEN, GetVisibility("error-code"));
+ EXPECT_TRUE(Click("details-button"));
+ EXPECT_EQ(VISIBLE, GetVisibility("details"));
+ EXPECT_EQ(VISIBLE, GetVisibility("proceed-link"));
+ EXPECT_EQ(HIDDEN, GetVisibility("error-code"));
+ EXPECT_TRUE(ClickAndWaitForDetach("primary-button"));
+
AssertNoInterstitial(false); // Assert the interstitial is gone
- EXPECT_EQ(
- GURL(content::kAboutBlankURL), // Back to "about:blank"
- browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
+ EXPECT_EQ(GURL(url::kAboutBlankURL), // Back to "about:blank"
+ browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
}
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, MalwareIframeProceed) {
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest,
+ MalwareIframeProceed) {
GURL url = SetupMalwareIframeWarningAndNavigate();
- EXPECT_TRUE(ClickAndWaitForDetach("proceed"));
+ EXPECT_TRUE(ClickAndWaitForDetach("proceed-link"));
AssertNoInterstitial(true); // Assert the interstitial is gone
EXPECT_EQ(url,
browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
}
-// http://crbug.com/273302
-#if defined(OS_WIN)
-// Temporarily re-enabled to get some logs.
-#define MAYBE_MalwareIframeReportDetails MalwareIframeReportDetails
-#else
-#define MAYBE_MalwareIframeReportDetails MalwareIframeReportDetails
-#endif
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest,
- MAYBE_MalwareIframeReportDetails) {
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest,
+ MalwareIframeReportDetails) {
scoped_refptr<content::MessageLoopRunner> malware_report_sent_runner(
new content::MessageLoopRunner);
SetReportSentCallback(malware_report_sent_runner->QuitClosure());
GURL url = SetupMalwareIframeWarningAndNavigate();
- LOG(INFO) << "1";
-
// If the DOM details from renderer did not already return, wait for them.
details_factory_.get_details()->WaitForDOM();
- LOG(INFO) << "2";
-
- EXPECT_TRUE(Click("check-report"));
- LOG(INFO) << "3";
- EXPECT_TRUE(ClickAndWaitForDetach("proceed"));
- LOG(INFO) << "4";
+ EXPECT_TRUE(Click("opt-in-checkbox"));
+ EXPECT_TRUE(ClickAndWaitForDetach("proceed-link"));
AssertNoInterstitial(true); // Assert the interstitial is gone
- LOG(INFO) << "5";
ASSERT_TRUE(browser()->profile()->GetPrefs()->GetBoolean(
- prefs::kSafeBrowsingReportingEnabled));
- LOG(INFO) << "6";
-
+ prefs::kSafeBrowsingExtendedReportingEnabled));
EXPECT_EQ(url,
browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
- LOG(INFO) << "7";
malware_report_sent_runner->Run();
std::string serialized = GetReportSent();
ASSERT_TRUE(report.ParseFromString(serialized));
// Verify the report is complete.
EXPECT_TRUE(report.complete());
- LOG(INFO) << "8";
}
// Verifies that the "proceed anyway" link isn't available when it is disabled
// by the corresponding policy. Also verifies that sending the "proceed"
// command anyway doesn't advance to the malware site.
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, ProceedDisabled) {
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest, ProceedDisabled) {
#if defined(OS_WIN) && defined(USE_ASH)
// Disable this test in Metro+Ash for now (http://crbug.com/262796).
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
SetupWarningAndNavigate(SB_THREAT_TYPE_URL_MALWARE);
- EXPECT_EQ(VISIBLE, GetVisibility("check-report"));
- EXPECT_EQ(HIDDEN, GetVisibility("show-diagnostic-link"));
- EXPECT_EQ(HIDDEN, GetVisibility("proceed"));
- EXPECT_EQ(HIDDEN, GetVisibility("proceed-span"));
- EXPECT_TRUE(Click("see-more-link"));
- EXPECT_EQ(VISIBLE, GetVisibility("show-diagnostic-link"));
- EXPECT_EQ(HIDDEN, GetVisibility("proceed"));
- EXPECT_EQ(HIDDEN, GetVisibility("proceed-span"));
+ EXPECT_EQ(VISIBLE, GetVisibility("primary-button"));
+ EXPECT_EQ(HIDDEN, GetVisibility("details"));
+ EXPECT_EQ(HIDDEN, GetVisibility("proceed-link"));
+ EXPECT_EQ(HIDDEN, GetVisibility("final-paragraph"));
+ EXPECT_TRUE(Click("details-button"));
+ EXPECT_EQ(HIDDEN, GetVisibility("proceed-link"));
+ EXPECT_EQ(HIDDEN, GetVisibility("final-paragraph"));
+ SendCommand("proceed");
// The "proceed" command should go back instead, if proceeding is disabled.
- EXPECT_TRUE(ClickAndWaitForDetach("proceed"));
AssertNoInterstitial(true);
- EXPECT_EQ(
- GURL(content::kAboutBlankURL), // Back to "about:blank"
- browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
+ EXPECT_EQ(GURL(url::kAboutBlankURL), // Back to "about:blank"
+ browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
}
// Verifies that the reporting checkbox is hidden on non-HTTP pages.
// TODO(mattm): Should also verify that no report is sent, but there isn't a
// good way to do that in the current design.
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, ReportingDisabled) {
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest,
+ ReportingDisabled) {
#if defined(OS_WIN) && defined(USE_ASH)
// Disable this test in Metro+Ash for now (http://crbug.com/262796).
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
#endif
browser()->profile()->GetPrefs()->SetBoolean(
- prefs::kSafeBrowsingReportingEnabled, true);
+ prefs::kSafeBrowsingExtendedReportingEnabled, true);
net::SpawnedTestServer https_server(
net::SpawnedTestServer::TYPE_HTTPS, net::SpawnedTestServer::kLocalhost,
ui_test_utils::NavigateToURL(browser(), url);
ASSERT_TRUE(WaitForReady());
- EXPECT_EQ(HIDDEN, GetVisibility("check-report"));
- EXPECT_EQ(HIDDEN, GetVisibility("show-diagnostic-link"));
- EXPECT_EQ(HIDDEN, GetVisibility("proceed"));
- EXPECT_TRUE(Click("see-more-link"));
- EXPECT_EQ(VISIBLE, GetVisibility("show-diagnostic-link"));
- EXPECT_EQ(VISIBLE, GetVisibility("proceed"));
+ EXPECT_EQ(HIDDEN, GetVisibility("malware-opt-in"));
+ EXPECT_EQ(HIDDEN, GetVisibility("opt-in-checkbox"));
+ EXPECT_EQ(HIDDEN, GetVisibility("proceed-link"));
+ EXPECT_TRUE(Click("details-button"));
+ EXPECT_EQ(VISIBLE, GetVisibility("help-link"));
+ EXPECT_EQ(VISIBLE, GetVisibility("proceed-link"));
- EXPECT_TRUE(ClickAndWaitForDetach("back"));
+ EXPECT_TRUE(ClickAndWaitForDetach("primary-button"));
AssertNoInterstitial(false); // Assert the interstitial is gone
- EXPECT_EQ(
- GURL(content::kAboutBlankURL), // Back to "about:blank"
- browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
+ EXPECT_EQ(GURL(url::kAboutBlankURL), // Back to "about:blank"
+ browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
}
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, PhishingDontProceed) {
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest,
+ PhishingDontProceed) {
#if defined(OS_WIN) && defined(USE_ASH)
// Disable this test in Metro+Ash for now (http://crbug.com/262796).
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests))
SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING);
- EXPECT_EQ(HIDDEN, GetVisibility("malware-icon"));
- EXPECT_EQ(HIDDEN, GetVisibility("subresource-icon"));
- EXPECT_EQ(VISIBLE, GetVisibility("phishing-icon"));
- EXPECT_EQ(HIDDEN, GetVisibility("check-report"));
- EXPECT_EQ(HIDDEN, GetVisibility("show-diagnostic-link"));
- EXPECT_EQ(HIDDEN, GetVisibility("report-error-link"));
- EXPECT_EQ(HIDDEN, GetVisibility("proceed"));
- EXPECT_TRUE(Click("see-more-link"));
- EXPECT_EQ(HIDDEN, GetVisibility("show-diagnostic-link"));
- EXPECT_EQ(VISIBLE, GetVisibility("report-error-link"));
- EXPECT_EQ(VISIBLE, GetVisibility("proceed"));
-
- EXPECT_TRUE(ClickAndWaitForDetach("back"));
+ EXPECT_EQ(VISIBLE, GetVisibility("primary-button"));
+ EXPECT_EQ(HIDDEN, GetVisibility("details"));
+ EXPECT_EQ(HIDDEN, GetVisibility("proceed-link"));
+ EXPECT_EQ(HIDDEN, GetVisibility("error-code"));
+ EXPECT_TRUE(Click("details-button"));
+ EXPECT_EQ(VISIBLE, GetVisibility("details"));
+ EXPECT_EQ(VISIBLE, GetVisibility("proceed-link"));
+ EXPECT_EQ(HIDDEN, GetVisibility("error-code"));
+ EXPECT_TRUE(ClickAndWaitForDetach("primary-button"));
+
AssertNoInterstitial(false); // Assert the interstitial is gone
- EXPECT_EQ(
- GURL(content::kAboutBlankURL), // We are back to "about:blank".
- browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
+ EXPECT_EQ(GURL(url::kAboutBlankURL), // We are back to "about:blank".
+ browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
}
-// http://crbug.com/247763
-#if defined(OS_WIN)
-// Temporarily re-enabled to get some logs.
-#define MAYBE_PhishingProceed PhishingProceed
-#else
-#define MAYBE_PhishingProceed PhishingProceed
-#endif
-
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, MAYBE_PhishingProceed) {
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest, PhishingProceed) {
GURL url = SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING);
- LOG(INFO) << "1";
-
- EXPECT_TRUE(ClickAndWaitForDetach("proceed"));
- LOG(INFO) << "2";
+ EXPECT_TRUE(ClickAndWaitForDetach("proceed-link"));
AssertNoInterstitial(true); // Assert the interstitial is gone
- LOG(INFO) << "3";
EXPECT_EQ(url,
browser()->tab_strip_model()->GetActiveWebContents()->GetURL());
- LOG(INFO) << "4";
}
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, PhishingReportError) {
+IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageBrowserTest, PhishingLearnMore) {
SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING);
-
- EXPECT_TRUE(ClickAndWaitForDetach("report-error-link"));
- AssertNoInterstitial(false); // Assert the interstitial is gone
-
- // We are in the error reporting page.
- EXPECT_EQ(
- "/safebrowsing/report_error/",
- browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path());
-}
-
-// See crbug.com/248447
-#if defined(OS_WIN)
-// Temporarily re-enabled to get some logs.
-#define MAYBE_PhishingLearnMore PhishingLearnMore
-#else
-#define MAYBE_PhishingLearnMore PhishingLearnMore
-#endif
-
-IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, MAYBE_PhishingLearnMore) {
- SetupWarningAndNavigate(SB_THREAT_TYPE_URL_PHISHING);
- LOG(INFO) << "1";
-
- EXPECT_TRUE(ClickAndWaitForDetach("learn-more-link"));
- LOG(INFO) << "2";
+ EXPECT_TRUE(ClickAndWaitForDetach("help-link"));
AssertNoInterstitial(false); // Assert the interstitial is gone
- LOG(INFO) << "3";
// We are in the help page.
EXPECT_EQ(
"/transparencyreport/safebrowsing/",
browser()->tab_strip_model()->GetActiveWebContents()->GetURL().path());
- LOG(INFO) << "4";
}