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

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

Issue 1417973002: [Cronet] Switch from InstrumentationTest to junit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Helen's comments Created 5 years, 2 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
« no previous file with comments | « net/android/BUILD.gn ('k') | net/net.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cfd748b05f2b79a80c3589e334b0a119a4468b68..545229a4bf9f43dc40a436b8dc3df97c5a05d940 100644
--- a/net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java
+++ b/net/android/javatests/src/org/chromium/net/NetworkChangeNotifierTest.java
@@ -200,7 +200,7 @@ public class NetworkChangeNotifierTest extends InstrumentationTestCase {
// Verify last notification was the expected one.
public void assertLastChange(ChangeType type, int netId) throws Exception {
// Make sure notification processed.
- flushUiThreadTaskQueue();
+ NetworkChangeNotifierTestUtil.flushUiThreadTaskQueue();
assertEquals(type, mLastChangeSeen);
assertEquals(netId, mLastNetIdSeen);
mLastChangeSeen = ChangeType.NONE;
@@ -262,15 +262,6 @@ public class NetworkChangeNotifierTest extends InstrumentationTestCase {
return mNetworkConstructor.newInstance(netId);
}
- // Flush UI thread task queue.
- private static void flushUiThreadTaskQueue() throws Exception {
- FutureTask<Void> task = new FutureTask<Void>(new Runnable() {
- public void run() {}
- }, null);
- ThreadUtils.postOnUiThread(task);
- task.get();
- }
-
@Override
protected void setUp() throws Exception {
super.setUp();
« no previous file with comments | « net/android/BUILD.gn ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698