OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package org.chromium.net; |
| 6 |
| 7 import android.test.InstrumentationTestCase; |
| 8 import android.test.suitebuilder.annotation.SmallTest; |
| 9 |
| 10 import org.chromium.base.test.util.Feature; |
| 11 |
| 12 public class GURLUtilsTest extends InstrumentationTestCase { |
| 13 |
| 14 @SmallTest |
| 15 @Feature({"Android-AppBase"}) |
| 16 public void testSchemeIs() throws Throwable { |
| 17 assertTrue(GURLUtils.schemeIs("foo:bar", "foo")); |
| 18 assertTrue(GURLUtils.schemeIs(" fOo: bar", "foo")); |
| 19 assertTrue(GURLUtils.schemeIs("Http://example.com:88/index?q#frg:", "htt
p")); |
| 20 assertTrue(GURLUtils.schemeIs(" data:text/html,<body>hello # ? : world</
body>", "data")); |
| 21 |
| 22 assertFalse(GURLUtils.schemeIs("foo bar", "foo")); |
| 23 assertFalse(GURLUtils.schemeIs("foo:bar", "bar")); |
| 24 assertFalse(GURLUtils.schemeIs("data :bar", "data")); |
| 25 } |
| 26 } |
OLD | NEW |