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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/util/UrlUtilitiesTest.java

Issue 2110543004: Move JNI bindings for url_formatter from chrome to //components/url_formatter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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
Index: chrome/android/javatests/src/org/chromium/chrome/browser/util/UrlUtilitiesTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/util/UrlUtilitiesTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/util/UrlUtilitiesTest.java
index 05995cf98e92e0ac4899dc1b2f774f4a07070015..a0a3ac8390d8310d7d09f8bab0e5f20c9685fb29 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/util/UrlUtilitiesTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/util/UrlUtilitiesTest.java
@@ -6,11 +6,8 @@ package org.chromium.chrome.browser.util;
import android.test.suitebuilder.annotation.SmallTest;
-import org.chromium.base.test.util.Feature;
import org.chromium.content.browser.test.NativeLibraryTestBase;
-import java.net.URI;
-
/** Tests for {@link UrlUtilities}. */
public class UrlUtilitiesTest extends NativeLibraryTestBase {
@@ -78,42 +75,6 @@ public class UrlUtilitiesTest extends NativeLibraryTestBase {
}
@SmallTest
- @Feature({"Webapps"})
- public void testFormatUrlForSecurityDisplay() {
- URI uri;
-
- uri = URI.create("http://chopped.com/is/awesome");
- assertEquals("http://chopped.com", UrlUtilities.formatUrlForSecurityDisplay(uri, true));
- assertEquals("chopped.com", UrlUtilities.formatUrlForSecurityDisplay(uri, false));
-
- uri = URI.create("http://lopped.com");
- assertEquals("http://lopped.com", UrlUtilities.formatUrlForSecurityDisplay(uri, true));
- assertEquals("lopped.com", UrlUtilities.formatUrlForSecurityDisplay(uri, false));
-
- uri = URI.create("http://dropped.com?things");
- assertEquals("http://dropped.com", UrlUtilities.formatUrlForSecurityDisplay(uri, true));
- assertEquals("dropped.com", UrlUtilities.formatUrlForSecurityDisplay(uri, false));
-
- uri = URI.create("http://dfalcant@stopped.com:1234");
- assertEquals(
- "http://stopped.com:1234", UrlUtilities.formatUrlForSecurityDisplay(uri, true));
- assertEquals("stopped.com:1234", UrlUtilities.formatUrlForSecurityDisplay(uri, false));
-
- uri = URI.create("http://dfalcant:secret@stopped.com:9999");
- assertEquals(
- "http://stopped.com:9999", UrlUtilities.formatUrlForSecurityDisplay(uri, true));
- assertEquals("stopped.com:9999", UrlUtilities.formatUrlForSecurityDisplay(uri, false));
-
- uri = URI.create("chrome://settings:443");
- assertEquals("chrome://settings:443", UrlUtilities.formatUrlForSecurityDisplay(uri, true));
- assertEquals("chrome://settings:443", UrlUtilities.formatUrlForSecurityDisplay(uri, false));
-
- uri = URI.create("about:blank");
- assertEquals("about:blank", UrlUtilities.formatUrlForSecurityDisplay(uri, true));
- assertEquals("about:blank", UrlUtilities.formatUrlForSecurityDisplay(uri, false));
- }
-
- @SmallTest
public void testValidateIntentUrl() {
// Valid action, hostname, and (empty) path.
assertTrue(UrlUtilities.validateIntentUrl(

Powered by Google App Engine
This is Rietveld 408576698