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

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

Issue 2214163002: Revert of Expose effective connection type to Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.content.Context; 7 import android.content.Context;
8 import android.content.ContextWrapper; 8 import android.content.ContextWrapper;
9 import android.os.ConditionVariable; 9 import android.os.ConditionVariable;
10 import android.os.Handler; 10 import android.os.Handler;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // NETWORK_QUALITY_OBSERVATION_SOURCE_TCP 319 // NETWORK_QUALITY_OBSERVATION_SOURCE_TCP
320 assertTrue(rttListener.rttObservationCount(1) > 0); 320 assertTrue(rttListener.rttObservationCount(1) > 0);
321 321
322 // NETWORK_QUALITY_OBSERVATION_SOURCE_QUIC 322 // NETWORK_QUALITY_OBSERVATION_SOURCE_QUIC
323 assertEquals(0, rttListener.rttObservationCount(2)); 323 assertEquals(0, rttListener.rttObservationCount(2));
324 324
325 // Verify that the listeners were notified on the expected thread. 325 // Verify that the listeners were notified on the expected thread.
326 assertEquals(mNetworkQualityThread, rttListener.getThread()); 326 assertEquals(mNetworkQualityThread, rttListener.getThread());
327 assertEquals(mNetworkQualityThread, throughputListener.getThread()); 327 assertEquals(mNetworkQualityThread, throughputListener.getThread());
328 328
329 // Verify that effective connection type callback is received and
330 // effective connection type is correctly set.
331 assertTrue(mTestFramework.mCronetEngine.getEffectiveConnectionType()
332 != EffectiveConnectionType.EFFECTIVE_CONNECTION_TYPE_UNKNOWN);
333
334 mTestFramework.mCronetEngine.shutdown(); 329 mTestFramework.mCronetEngine.shutdown();
335 } 330 }
336 331
337 332
338 333
339 /** 334 /**
340 @SmallTest 335 @SmallTest
341 @Feature({"Cronet"}) 336 @Feature({"Cronet"})
342 https://crbug.com/596929 337 https://crbug.com/596929
343 */ 338 */
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 } 1113 }
1119 }.start(); 1114 }.start();
1120 otherThreadDone.block(); 1115 otherThreadDone.block();
1121 builder.build().shutdown(); 1116 builder.build().shutdown();
1122 uiThreadDone.open(); 1117 uiThreadDone.open();
1123 } 1118 }
1124 }); 1119 });
1125 assertTrue(uiThreadDone.block(1000)); 1120 assertTrue(uiThreadDone.block(1000));
1126 } 1121 }
1127 } 1122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698