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(); |