Commit f0f0169b authored by thildebr's avatar thildebr Committed by Commit Bot

Fix app data clearing timeouts for PersonalDataManagerTest.

Was using the wrong context from InstrumentationRegistry in
ClearAppDataTestRule, so now that's fixed.

Also enables the temporarily disabled tests now that they work again.

BUG=739575

Review-Url: https://codereview.chromium.org/2970263002
Cr-Commit-Position: refs/heads/master@{#485001}
parent cc736433
......@@ -14,7 +14,6 @@ import org.junit.rules.RuleChain;
import org.junit.runner.RunWith;
import org.chromium.base.test.BaseJUnit4ClassRunner;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.RetryOnFailure;
import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile;
......@@ -121,12 +120,9 @@ public class PersonalDataManagerTest {
}
@Test
/*
@SmallTest
@Feature({"Autofill"})
@RetryOnFailure
*/
@DisabledTest(message = "crbug.com/739575")
public void testAddAndDeleteProfile()
throws InterruptedException, ExecutionException, TimeoutException {
String profileOneGUID = mHelper.setProfile(createTestProfile());
......@@ -261,11 +257,8 @@ public class PersonalDataManagerTest {
}
@Test
/*
@SmallTest
@Feature({"Autofill"})
*/
@DisabledTest(message = "crbug.com/739575")
public void testLabels() throws InterruptedException, ExecutionException, TimeoutException {
AutofillProfile profile1 = new AutofillProfile(
"" /* guid */, "https://www.example.com" /* origin */,
......@@ -317,11 +310,8 @@ public class PersonalDataManagerTest {
}
@Test
/*
@SmallTest
@Feature({"Autofill"})
*/
@DisabledTest(message = "crbug.com/739575")
public void testProfilesFrecency()
throws InterruptedException, ExecutionException, TimeoutException {
// Create 3 profiles.
......@@ -447,12 +437,9 @@ public class PersonalDataManagerTest {
}
@Test
/*
@SmallTest
@Feature({"Autofill"})
@RetryOnFailure
*/
@DisabledTest(message = "crbug.com/739575")
public void testCreditCardUseStatsSettingAndGetting()
throws InterruptedException, ExecutionException, TimeoutException {
String guid = mHelper.setCreditCard(
......@@ -500,12 +487,9 @@ public class PersonalDataManagerTest {
}
@Test
/*
@SmallTest
@Feature({"Autofill"})
@RetryOnFailure
*/
@DisabledTest(message = "crbug.com/739575")
public void testRecordAndLogCreditCardUse()
throws InterruptedException, ExecutionException, TimeoutException {
String guid = mHelper.setCreditCard(
......
......@@ -23,7 +23,9 @@ public class ClearAppDataTestRule implements TestRule {
return new Statement() {
@Override
public void evaluate() throws Throwable {
ApplicationData.clearAppData(InstrumentationRegistry.getContext());
ApplicationData.clearAppData(
InstrumentationRegistry.getInstrumentation().getTargetContext());
base.evaluate();
}
};
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment