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

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: Addressed Comments 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..b95c8ad29db8847702a7491d4635eafb8455e6fe 100644
--- a/net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java
+++ b/net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java
@@ -163,14 +163,14 @@ public class NetworkChangeNotifierTest extends InstrumentationTestCase {
observer.resetHasReceivedNotification();
// Pretend we got moved to the background.
- receiver.onActivityStateChange(ActivityStatus.PAUSED);
+ receiver.onApplicationStateChange(ActivityStatus.APP_PAUSED);
// 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(ActivityStatus.APP_RUNNING);
assertTrue(observer.hasReceivedNotification());
}
}

Powered by Google App Engine
This is Rietveld 408576698