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

Unified Diff: net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java

Issue 2812963002: [Cronet] Move initialization to a new thread rather than the UI thread. (Closed)
Patch Set: update tests to account for mRegistered change 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 side-by-side diff with in-line comments
Download patch
Index: net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java
diff --git a/net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java b/net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java
index 78342aa6632fd367802498c84914e8f724e57251..caa9ec86ec24d45303f920095163d1e8f4109916 100644
--- a/net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java
+++ b/net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java
@@ -592,6 +592,7 @@ public class NetworkChangeNotifierTest {
@MediumTest
@Feature({"Android-AppBase"})
public void testNetworkChangeNotifierJavaObservers() {
+ mReceiver.register();
// Initialize the NetworkChangeNotifier with a connection.
Intent connectivityIntent = new Intent(ConnectivityManager.CONNECTIVITY_ACTION);
mReceiver.onReceive(InstrumentationRegistry.getInstrumentation().getTargetContext(),
@@ -657,6 +658,7 @@ public class NetworkChangeNotifierTest {
@MediumTest
@Feature({"Android-AppBase"})
public void testNetworkChangeNotifierMaxBandwidthNotifications() {
+ mReceiver.register();
// Initialize the NetworkChangeNotifier with a connection.
mConnectivityDelegate.setActiveNetworkExists(true);
mConnectivityDelegate.setNetworkType(ConnectivityManager.TYPE_WIFI);
@@ -953,6 +955,7 @@ public class NetworkChangeNotifierTest {
@MediumTest
@Feature({"Android-AppBase"})
public void testNetworkChangeNotifierIsOnline() {
+ mReceiver.register();
Intent intent = new Intent(ConnectivityManager.CONNECTIVITY_ACTION);
// For any connection type it should return true.
for (int i = ConnectivityManager.TYPE_MOBILE; i < ConnectivityManager.TYPE_VPN; i++) {

Powered by Google App Engine
This is Rietveld 408576698