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

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

Issue 2920503002: [Cronet] Fix test issue on Marshmallow, need to call parent setUp() (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import org.chromium.net.impl.CronetUrlRequestContext; 10 import org.chromium.net.impl.CronetUrlRequestContext;
(...skipping 10 matching lines...) Expand all
21 */ 21 */
22 private boolean mTestWasRun; 22 private boolean mTestWasRun;
23 /** 23 /**
24 * For {@link #testRunBothImplsMustRun}, use {@link #mTestNativeImplRun} to verify that the 24 * For {@link #testRunBothImplsMustRun}, use {@link #mTestNativeImplRun} to verify that the
25 * test is run against the native implementation. 25 * test is run against the native implementation.
26 */ 26 */
27 private boolean mTestNativeImplRun; 27 private boolean mTestNativeImplRun;
28 28
29 @Override 29 @Override
30 protected void setUp() throws Exception { 30 protected void setUp() throws Exception {
31 super.setUp();
31 mTestFramework = startCronetTestFramework(); 32 mTestFramework = startCronetTestFramework();
32 } 33 }
33 34
34 @Override 35 @Override
35 protected void tearDown() throws Exception { 36 protected void tearDown() throws Exception {
36 if (getName().contains("MustRun") && !mTestWasRun) { 37 if (getName().contains("MustRun") && !mTestWasRun) {
37 fail(getName() + " should have run but didn't."); 38 fail(getName() + " should have run but didn't.");
38 } 39 }
39 super.tearDown(); 40 super.tearDown();
40 } 41 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 @SmallTest 73 @SmallTest
73 @Feature({"Cronet"}) 74 @Feature({"Cronet"})
74 @OnlyRunNativeCronet 75 @OnlyRunNativeCronet
75 public void testRunOnlyNativeMustRun() { 76 public void testRunOnlyNativeMustRun() {
76 assertFalse(testingJavaImpl()); 77 assertFalse(testingJavaImpl());
77 assertFalse(mTestWasRun); 78 assertFalse(mTestWasRun);
78 mTestWasRun = true; 79 mTestWasRun = true;
79 assertEquals(mTestFramework.mCronetEngine.getClass(), CronetUrlRequestCo ntext.class); 80 assertEquals(mTestFramework.mCronetEngine.getClass(), CronetUrlRequestCo ntext.class);
80 } 81 }
81 } 82 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698