Unbundling work
Moved AndroidHttpClient, Rfc822InputFilter, Rfc822Validator NumberPicker, NumberPickerButton to android-common ---
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
package com.android.unit_tests;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.net.http.AndroidHttpClient;
|
||||
import android.provider.Checkin;
|
||||
import android.provider.Settings;
|
||||
import android.test.AndroidTestCase;
|
||||
@@ -64,6 +63,10 @@ public class GoogleHttpClientTest extends AndroidTestCase {
|
||||
if (mServer != null) mServer.shutdown();
|
||||
}
|
||||
|
||||
//
|
||||
// Fix this test to use the new mechanism to indicate that the
|
||||
// Http client is running in the UI thread
|
||||
// bug: http://b/2322326
|
||||
@LargeTest
|
||||
public void testThreadCheck() throws Exception {
|
||||
ContentResolver resolver = getContext().getContentResolver();
|
||||
@@ -77,7 +80,9 @@ public class GoogleHttpClientTest extends AndroidTestCase {
|
||||
|
||||
// This is actually an AndroidHttpClient feature...
|
||||
// TODO: somehow test that Activity threads have the flag set?
|
||||
AndroidHttpClient.setThreadBlocked(true);
|
||||
// Thus now uses the looper state to determine if it is in a UI
|
||||
// thread
|
||||
//AndroidHttpClient.setThreadBlocked(true);
|
||||
|
||||
try {
|
||||
client.execute(method);
|
||||
@@ -85,7 +90,7 @@ public class GoogleHttpClientTest extends AndroidTestCase {
|
||||
} catch (RuntimeException e) {
|
||||
if (!e.toString().contains("forbids HTTP requests")) throw e;
|
||||
} finally {
|
||||
AndroidHttpClient.setThreadBlocked(false);
|
||||
// AndroidHttpClient.setThreadBlocked(false);
|
||||
}
|
||||
|
||||
HttpResponse response = client.execute(method);
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
|
||||
package com.android.unit_tests;
|
||||
|
||||
import com.google.android.collect.Lists;
|
||||
import com.google.android.collect.Maps;
|
||||
|
||||
import android.graphics.Paint;
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
import android.test.suitebuilder.annotation.SmallTest;
|
||||
@@ -29,9 +26,12 @@ import android.text.SpannedString;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextUtils;
|
||||
import android.text.style.StyleSpan;
|
||||
import android.text.util.Rfc822Validator;
|
||||
import android.test.MoreAsserts;
|
||||
|
||||
import com.android.common.Rfc822Validator;
|
||||
import com.google.android.collect.Lists;
|
||||
import com.google.android.collect.Maps;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
Reference in New Issue
Block a user