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

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

Issue 159173002: Refactor ActivityStatus to not store current activity (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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 01c05b8fd677452892f62539b0112b228afe6ac1..887bc3bb9fe9150fc28e85132afa386120e8721a 100644
--- a/net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java
+++ b/net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java
@@ -12,7 +12,7 @@ import android.test.InstrumentationTestCase;
import android.test.UiThreadTest;
import android.test.suitebuilder.annotation.MediumTest;
-import org.chromium.base.ActivityStatus;
+import org.chromium.base.ApplicationState;
import org.chromium.base.test.util.Feature;
/**
@@ -163,14 +163,14 @@ public class NetworkChangeNotifierTest extends InstrumentationTestCase {
observer.resetHasReceivedNotification();
// Pretend we got moved to the background.
- receiver.onActivityStateChange(ActivityStatus.PAUSED);
+ receiver.onApplicationStateChange(ApplicationState.HAS_PAUSED_ACTIVITIES);
// Change the state.
connectivityDelegate.setActiveNetworkExists(true);
connectivityDelegate.setNetworkType(NetworkChangeNotifier.CONNECTION_WIFI);
// The NetworkChangeNotifierAutoDetect doesn't receive any notification while we are in the
// background, but when we get back to the foreground the state changed should be detected
// and a notification sent.
- receiver.onActivityStateChange(ActivityStatus.RESUMED);
+ receiver.onApplicationStateChange(ApplicationState.HAS_RUNNING_ACTIVITIES);
assertTrue(observer.hasReceivedNotification());
}
}

Powered by Google App Engine
This is Rietveld 408576698