Commit 48a9c061 authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

SafeBrowsing: webui debug page for MUwS warning

This only changes debugging pages in Chrome, not general Safe Browsing
behavior.

This adds two new pages to chrome://interstitials for Loud and Quiet
Malicious Unwanted Software warnings (AKA "MUwS", "UwS", "Harmful").

R=jialiul@chromium.org

      Unwanted Software links"
      --gtest_filter=InterstitialUITest.UnwantedSoftwareInterstitial*

Bug: 729271
Test: Manual - open chrome://interstitials and click the new "Malicious
Test: out/Desktop/browser_tests \
Change-Id: Iab28f8099e184a747c7589ffda19098126d25c86
Reviewed-on: https://chromium-review.googlesource.com/1188948Reviewed-by: default avatarJialiu Lin <jialiul@chromium.org>
Reviewed-by: default avatarMatt Mueller <mattm@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586046}
parent 995c1fac
......@@ -271,11 +271,12 @@ safe_browsing::SafeBrowsingBlockingPage* CreateSafeBrowsingBlockingPage(
if (net::GetValueForKeyInQuery(web_contents->GetURL(),
"type",
&type_param)) {
// TODO(mattm): add param for SB_THREAT_TYPE_URL_UNWANTED.
if (type_param == "malware") {
threat_type = safe_browsing::SB_THREAT_TYPE_URL_MALWARE;
} else if (type_param == "phishing") {
threat_type = safe_browsing::SB_THREAT_TYPE_URL_PHISHING;
} else if (type_param == "unwanted") {
threat_type = safe_browsing::SB_THREAT_TYPE_URL_UNWANTED;
} else if (type_param == "clientside_malware") {
threat_type = safe_browsing::SB_THREAT_TYPE_URL_CLIENT_SIDE_MALWARE;
} else if (type_param == "clientside_phishing") {
......@@ -327,6 +328,8 @@ TestSafeBrowsingBlockingPageQuiet* CreateSafeBrowsingQuietBlockingPage(
threat_type = safe_browsing::SB_THREAT_TYPE_URL_MALWARE;
} else if (type_param == "phishing") {
threat_type = safe_browsing::SB_THREAT_TYPE_URL_PHISHING;
} else if (type_param == "unwanted") {
threat_type = safe_browsing::SB_THREAT_TYPE_URL_UNWANTED;
} else if (type_param == "giant") {
threat_type = safe_browsing::SB_THREAT_TYPE_URL_MALWARE;
is_giant_webview = true;
......
......@@ -101,6 +101,11 @@ IN_PROC_BROWSER_TEST_F(InterstitialUITest, PhishingInterstitial) {
"Security error");
}
IN_PROC_BROWSER_TEST_F(InterstitialUITest, UnwantedSoftwareInterstitial) {
TestInterstitial(GURL("chrome://interstitials/safebrowsing?type=unwanted"),
"Security error");
}
IN_PROC_BROWSER_TEST_F(InterstitialUITest, MalwareInterstitialQuiet) {
TestInterstitial(
GURL("chrome://interstitials/quietsafebrowsing?type=malware"),
......@@ -113,6 +118,12 @@ IN_PROC_BROWSER_TEST_F(InterstitialUITest, PhishingInterstitialQuiet) {
"Security error");
}
IN_PROC_BROWSER_TEST_F(InterstitialUITest, UnwantedSoftwareInterstitialQuiet) {
TestInterstitial(
GURL("chrome://interstitials/quietsafebrowsing?type=unwanted"),
"Security error");
}
IN_PROC_BROWSER_TEST_F(InterstitialUITest, ClientsideMalwareInterstitial) {
TestInterstitial(
GURL("chrome://interstitials/safebrowsing?type=clientside_malware"),
......
......@@ -65,6 +65,9 @@
<li>
<a href="safebrowsing?type=phishing">Phishing</a>
</li>
<li>
<a href="safebrowsing?type=unwanted">Malicious Unwanted Software</a>
</li>
<li>
<a href="safebrowsing?type=clientside_malware">Client Side Malware</a>
</li>
......@@ -83,6 +86,9 @@
<li>
<a href="quietsafebrowsing?type=phishing">Phishing</a>
</li>
<li>
<a href="quietsafebrowsing?type=unwanted">Malicious Unwanted Software</a>
</li>
<li>
<a href="quietsafebrowsing?type=giant">Giant</a>
</li>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment