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

Unified Diff: net/android/javatests/src/org/chromium/net/GURLUtilsTest.java

Issue 84703003: Allow data URL > 2MB for loadDataWithBaseURL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bo comments Created 7 years, 1 month 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: net/android/javatests/src/org/chromium/net/GURLUtilsTest.java
diff --git a/net/android/javatests/src/org/chromium/net/GURLUtilsTest.java b/net/android/javatests/src/org/chromium/net/GURLUtilsTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..d0b2b495c55f0bf578b1fa6bbf729062fffed7f3
--- /dev/null
+++ b/net/android/javatests/src/org/chromium/net/GURLUtilsTest.java
@@ -0,0 +1,26 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.net;
+
+import android.test.InstrumentationTestCase;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import org.chromium.base.test.util.Feature;
+
+public class GURLUtilsTest extends InstrumentationTestCase {
+
+ @SmallTest
+ @Feature({"Android-AppBase"})
+ public void testSchemeIs() throws Throwable {
+ assertTrue(GURLUtils.schemeIs("foo:bar", "foo"));
+ assertTrue(GURLUtils.schemeIs(" fOo: bar", "foo"));
+ assertTrue(GURLUtils.schemeIs("Http://example.com:88/index?q#frg:", "http"));
+ assertTrue(GURLUtils.schemeIs(" data:text/html,<body>hello # ? : world</body>", "data"));
+
+ assertFalse(GURLUtils.schemeIs("foo bar", "foo"));
+ assertFalse(GURLUtils.schemeIs("foo:bar", "bar"));
+ assertFalse(GURLUtils.schemeIs("data :bar", "data"));
+ }
+}
« base/memory/ref_counted_memory.h ('K') | « net/android/java/src/org/chromium/net/GURLUtils.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698