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

Unified Diff: net/android/javatests/src/org/chromium/net/AndroidProxyConfigServiceTestUtil.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/AndroidProxyConfigServiceTestUtil.java
diff --git a/net/android/javatests/src/org/chromium/net/AndroidProxyConfigServiceTestUtil.java b/net/android/javatests/src/org/chromium/net/AndroidProxyConfigServiceTestUtil.java
new file mode 100644
index 0000000000000000000000000000000000000000..99a6f7534cf890fb6724e142eaa7a57cbdde577d
--- /dev/null
+++ b/net/android/javatests/src/org/chromium/net/AndroidProxyConfigServiceTestUtil.java
@@ -0,0 +1,22 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.net;
+
+import android.os.Looper;
+
+import org.chromium.base.annotations.CalledByNative;
+
+/**
+ * Utility functions for testing features implemented in ProxyConfigServiceAndroid.
+ */
+public class AndroidProxyConfigServiceTestUtil {
+ /**
+ * Helper for tests that prepares the Looper on the current thread.
+ */
+ @CalledByNative
+ private static void prepareLooper() {
+ Looper.prepare();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698