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

Unified Diff: components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/HttpUrlRequestFactoryTest.java

Issue 560153002: Add Cronet Test App that uses libcronet_tests.so with net test utilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added real waitForActiveShellToBeDoneLoading Created 6 years, 3 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: components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/HttpUrlRequestFactoryTest.java
diff --git a/components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/HttpUrlRequestFactoryTest.java b/components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/HttpUrlRequestFactoryTest.java
deleted file mode 100644
index e37b2d23a014af00a3126a12e305fa09fe1a298a..0000000000000000000000000000000000000000
--- a/components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/HttpUrlRequestFactoryTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2014 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.cronet_sample_apk;
-
-import android.test.InstrumentationTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import org.chromium.base.test.util.Feature;
-import org.chromium.net.HttpUrlRequestFactory;
-import org.chromium.net.HttpUrlRequestFactoryConfig;
-
-import java.util.regex.Pattern;
-
-/**
- * Tests for {@link HttpUrlRequestFactory}
- */
-public class HttpUrlRequestFactoryTest extends InstrumentationTestCase {
- @SmallTest
- @Feature({"Cronet"})
- public void testCreateFactory() {
- HttpUrlRequestFactoryConfig config = new HttpUrlRequestFactoryConfig();
- HttpUrlRequestFactory factory = HttpUrlRequestFactory.createFactory(
- getInstrumentation().getContext(), config);
- assertNotNull("Factory should be created", factory);
- assertTrue("Factory should be Chromium/n.n.n.n@r but is " +
- factory.getName(),
- Pattern.matches("Chromium/\\d+\\.\\d+\\.\\d+\\.\\d+@\\w+",
- factory.getName()));
- }
-
- @SmallTest
- @Feature({"Cronet"})
- public void testCreateLegacyFactory() {
- HttpUrlRequestFactoryConfig config = new HttpUrlRequestFactoryConfig();
- config.enableLegacyMode(true);
-
- HttpUrlRequestFactory factory = HttpUrlRequestFactory.createFactory(
- getInstrumentation().getContext(), config);
- assertNotNull("Factory should be created", factory);
- assertTrue("Factory should be HttpUrlConnection/n.n.n.n@r but is " +
- factory.getName(),
- Pattern.matches(
- "HttpUrlConnection/\\d+\\.\\d+\\.\\d+\\.\\d+@\\w+",
- factory.getName()));
- }
-}

Powered by Google App Engine
This is Rietveld 408576698