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

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

Issue 2223773003: Expose effective connection type to Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased, addressed comments Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.os.ConditionVariable; 7 import android.os.ConditionVariable;
8 import android.test.suitebuilder.annotation.LargeTest; 8 import android.test.suitebuilder.annotation.LargeTest;
9 import android.test.suitebuilder.annotation.SmallTest; 9 import android.test.suitebuilder.annotation.SmallTest;
10 10
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 assertTrue(throughputListener.throughputObservationCount() > 0); 217 assertTrue(throughputListener.throughputObservationCount() > 0);
218 218
219 // Check RTT observation count after throughput observation has been rec eived. This ensures 219 // Check RTT observation count after throughput observation has been rec eived. This ensures
220 // that executor has finished posting the RTT observation to the RTT lis teners. 220 // that executor has finished posting the RTT observation to the RTT lis teners.
221 // NETWORK_QUALITY_OBSERVATION_SOURCE_URL_REQUEST 221 // NETWORK_QUALITY_OBSERVATION_SOURCE_URL_REQUEST
222 assertTrue(rttListener.rttObservationCount(0) > 0); 222 assertTrue(rttListener.rttObservationCount(0) > 0);
223 223
224 // NETWORK_QUALITY_OBSERVATION_SOURCE_QUIC 224 // NETWORK_QUALITY_OBSERVATION_SOURCE_QUIC
225 assertTrue(rttListener.rttObservationCount(2) > 0); 225 assertTrue(rttListener.rttObservationCount(2) > 0);
226 226
227 // Verify that effective connection type callback is received and
228 // effective connection type is correctly set.
229 assertTrue(mTestFramework.mCronetEngine.getEffectiveConnectionType()
230 != EffectiveConnectionType.EFFECTIVE_CONNECTION_TYPE_UNKNOWN);
231
227 mTestFramework.mCronetEngine.shutdown(); 232 mTestFramework.mCronetEngine.shutdown();
228 } 233 }
229 } 234 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698