Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2152)

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java

Issue 2762843002: WebView: rename SafeBrowsing tests to be more consistent (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java
index 741eb9aeaefb661c961370cc7c038a0e4c594c95..77c3d8dba8015d3ae4725bcdd708d285d4340090 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java
@@ -203,7 +203,7 @@ public class SafeBrowsingTest extends AwTestBase {
@SmallTest
@Feature({"AndroidWebView"})
@CommandLineFlags.Add(AwSwitches.WEBVIEW_ENABLE_SAFEBROWSING_SUPPORT)
- public void testSafeBrowsingShowsInterstitialForMalware() throws Throwable {
+ public void testSafeBrowsingShowsInterstitialForMainFrame() throws Throwable {
loadGreenPage();
int count = mWebContentsObserver.getAttachedInterstitialPageHelper().getCallCount();
final String responseUrl = mTestServer.getURL(MALWARE_HTML_PATH);
@@ -222,7 +222,7 @@ public class SafeBrowsingTest extends AwTestBase {
@SmallTest
@Feature({"AndroidWebView"})
@CommandLineFlags.Add(AwSwitches.WEBVIEW_ENABLE_SAFEBROWSING_SUPPORT)
- public void testSafeBrowsingMaliciousSubresourceShowsInterstitial() throws Throwable {
+ public void testSafeBrowsingShowsInterstitialForSubresource() throws Throwable {
loadGreenPage();
int count = mWebContentsObserver.getAttachedInterstitialPageHelper().getCallCount();
final String responseUrl = mTestServer.getURL(IFRAME_HTML_PATH);
@@ -241,7 +241,7 @@ public class SafeBrowsingTest extends AwTestBase {
@SmallTest
@Feature({"AndroidWebView"})
@CommandLineFlags.Add(AwSwitches.WEBVIEW_ENABLE_SAFEBROWSING_SUPPORT)
- public void testSafeBrowsingCanProceedThroughInterstitial() throws Throwable {
+ public void testSafeBrowsingProceedThroughInterstitialForMainFrame() throws Throwable {
int interstitialCount =
mWebContentsObserver.getAttachedInterstitialPageHelper().getCallCount();
int pageFinishedCount =
@@ -259,7 +259,7 @@ public class SafeBrowsingTest extends AwTestBase {
@SmallTest
@Feature({"AndroidWebView"})
@CommandLineFlags.Add(AwSwitches.WEBVIEW_ENABLE_SAFEBROWSING_SUPPORT)
- public void testSafeBrowsingBackToSafetyShowsNetworkError() throws Throwable {
+ public void testSafeBrowsingDontProceedCausesNetworkErrorForMainFrame() throws Throwable {
int interstitialCount =
mWebContentsObserver.getAttachedInterstitialPageHelper().getCallCount();
final String responseUrl = mTestServer.getURL(MALWARE_HTML_PATH);
@@ -270,14 +270,14 @@ public class SafeBrowsingTest extends AwTestBase {
dontProceedThroughInterstitial();
errorHelper.waitForCallback(errorCount);
assertEquals(ErrorCodeConversionHelper.ERROR_UNKNOWN, errorHelper.getError().errorCode);
- assertEquals(responseUrl, errorHelper.getRequest().url);
+ assertEquals("Network error is for the malicious page", responseUrl,
+ errorHelper.getRequest().url);
}
@SmallTest
@Feature({"AndroidWebView"})
@CommandLineFlags.Add(AwSwitches.WEBVIEW_ENABLE_SAFEBROWSING_SUPPORT)
- public void testSafeBrowsingBackToSafetyShowsNetworkErrorForMaliciousSubresource()
- throws Throwable {
+ public void testSafeBrowsingDontProceedCausesNetworkErrorForSubresource() throws Throwable {
int interstitialCount =
mWebContentsObserver.getAttachedInterstitialPageHelper().getCallCount();
final String responseUrl = mTestServer.getURL(IFRAME_HTML_PATH);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698