Merge "Merge "Fix usermanager related tests." into nyc-mr1-dev am: bb883ddf59" into nyc-mr1-dev-plus-aosp

This commit is contained in:
Android Build Merger (Role)
2016-05-24 23:04:00 +00:00
committed by Android (Google) Code Review
3 changed files with 7 additions and 1 deletions

View File

@@ -23,12 +23,14 @@ import android.os.Parcelable;
import android.os.UserHandle;
import android.os.UserManager;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import android.util.AtomicFile;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
@SmallTest
public class UserManagerServiceTest extends AndroidTestCase {
private static String[] STRING_ARRAY = new String[] {"<tag", "<![CDATA["};
private File restrictionsFile;

View File

@@ -25,6 +25,7 @@ import android.os.Bundle;
import android.os.UserHandle;
import android.os.UserManager;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import com.android.internal.util.ArrayUtils;
@@ -33,6 +34,7 @@ import java.util.Arrays;
import java.util.List;
/** Test {@link UserManager} functionality. */
@MediumTest
public class UserManagerTest extends AndroidTestCase {
private static final int REMOVE_CHECK_INTERVAL = 500;
private static final int REMOVE_TIMEOUT = 60 * 1000;
@@ -96,7 +98,7 @@ public class UserManagerTest extends AndroidTestCase {
&& !user.isPrimary()) {
found = true;
Bundle restrictions = mUserManager.getUserRestrictions(user.getUserHandle());
assertFalse("New user should have DISALLOW_CONFIG_WIFI =false by default",
assertTrue("Guest user should have DISALLOW_CONFIG_WIFI=true by default",
restrictions.getBoolean(UserManager.DISALLOW_CONFIG_WIFI));
}
}

View File

@@ -23,6 +23,7 @@ import android.os.Bundle;
import android.os.UserManager;
import android.test.AndroidTestCase;
import android.test.MoreAsserts;
import android.test.suitebuilder.annotation.SmallTest;
/**
* Tests for {@link com.android.server.pm.UserRestrictionsUtils}.
@@ -35,6 +36,7 @@ import android.test.MoreAsserts;
-w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
* </pre>
*/
@SmallTest
public class UserRestrictionsUtilsTest extends AndroidTestCase {
public void testNonNull() {
Bundle out = UserRestrictionsUtils.nonNull(null);