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

Side by Side Diff: components/cronet/android/test/javatests/src/org/chromium/net/BrotliTest.java

Issue 2843293002: Switched to new versions of netty and tcnative (Closed)
Patch Set: Rebase + code formatting Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.net; 5 package org.chromium.net;
6 6
7 import android.support.test.filters.SmallTest; 7 import android.support.test.filters.SmallTest;
8 8
9 import org.chromium.base.test.util.Feature; 9 import org.chromium.base.test.util.Feature;
10 10
11 /** 11 /**
12 * Simple test for Brotli support. 12 * Simple test for Brotli support.
13 */ 13 */
14 public class BrotliTest extends CronetTestBase { 14 public class BrotliTest extends CronetTestBase {
15 private CronetTestFramework mTestFramework; 15 private CronetTestFramework mTestFramework;
16 16
17 @Override 17 @Override
18 protected void setUp() throws Exception { 18 protected void setUp() throws Exception {
19 super.setUp(); 19 super.setUp();
20 // Load library first to create MockCertVerifier. 20 // Load library first to create MockCertVerifier.
21 System.loadLibrary("cronet_tests"); 21 System.loadLibrary("cronet_tests");
22 assertTrue(Http2TestServer.startHttp2TestServer( 22 assertTrue(Http2TestServer.startHttp2TestServer(
23 getContext(), QuicTestServer.getServerCert(), QuicTestServer.get ServerCertKey())); 23 getContext(), SERVER_CERT_PEM, SERVER_KEY_PKCS8_PEM));
24 } 24 }
25 25
26 @Override 26 @Override
27 protected void tearDown() throws Exception { 27 protected void tearDown() throws Exception {
28 assertTrue(Http2TestServer.shutdownHttp2TestServer()); 28 assertTrue(Http2TestServer.shutdownHttp2TestServer());
29 mTestFramework.mCronetEngine.shutdown(); 29 mTestFramework.mCronetEngine.shutdown();
30 super.tearDown(); 30 super.tearDown();
31 } 31 }
32 32
33 @SmallTest 33 @SmallTest
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 private TestUrlRequestCallback startAndWaitForComplete(String url) { 82 private TestUrlRequestCallback startAndWaitForComplete(String url) {
83 TestUrlRequestCallback callback = new TestUrlRequestCallback(); 83 TestUrlRequestCallback callback = new TestUrlRequestCallback();
84 UrlRequest.Builder builder = mTestFramework.mCronetEngine.newUrlRequestB uilder( 84 UrlRequest.Builder builder = mTestFramework.mCronetEngine.newUrlRequestB uilder(
85 url, callback, callback.getExecutor()); 85 url, callback, callback.getExecutor());
86 builder.build().start(); 86 builder.build().start();
87 callback.blockForDone(); 87 callback.blockForDone();
88 return callback; 88 return callback;
89 } 89 }
90 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698