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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesBasicTest.java

Issue 2888313003: Update strings for history description in CBD (Closed)
Patch Set: add active datatype 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
« no previous file with comments | « chrome/android/java/strings/android_chrome_strings.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesBasicTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesBasicTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesBasicTest.java
index 3c851794be73705d5c316edc56ac98e1bfb6ad81..b4c862e6ac2dd3a960c8fd1d1809a18e3b7b25a1 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesBasicTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesBasicTest.java
@@ -20,6 +20,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.chromium.base.CollectionUtil;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.chrome.browser.ChromeActivity;
@@ -30,8 +31,12 @@ import org.chromium.chrome.test.ChromeActivityTestRule;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.chrome.test.util.browser.signin.SigninTestUtil;
import org.chromium.components.sync.AndroidSyncSettings;
+import org.chromium.components.sync.ModelType;
import org.chromium.components.sync.test.util.MockSyncContentResolverDelegate;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* Integration tests for ClearBrowsingDataPreferencesBasic.
*/
@@ -44,7 +49,7 @@ public class ClearBrowsingDataPreferencesBasicTest {
new ChromeActivityTestRule<>(ChromeActivity.class);
private static final String GOOGLE_ACCOUNT = "Google Account";
- private static final String OTHER_ACTIVITY = "other activity";
+ private static final String OTHER_ACTIVITY = "other forms of browsing history";
private static final String SIGNED_IN_DEVICES = "signed-in devices";
@Before
@@ -59,12 +64,23 @@ public class ClearBrowsingDataPreferencesBasicTest {
}
private static class StubProfileSyncService extends ProfileSyncService {
- StubProfileSyncService() {
+ private final boolean mSyncable;
+
+ StubProfileSyncService(boolean syncable) {
super();
+ mSyncable = syncable;
+ }
+
+ public Set<Integer> getActiveDataTypes() {
+ if (mSyncable) {
+ return CollectionUtil.newHashSet(ModelType.HISTORY_DELETE_DIRECTIVES);
+ } else {
+ return new HashSet<Integer>();
+ }
}
}
- private void setSyncable(boolean syncable) {
+ private void setSyncable(final boolean syncable) {
Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();
MockSyncContentResolverDelegate delegate = new MockSyncContentResolverDelegate();
delegate.setMasterSyncAutomatically(syncable);
@@ -78,7 +94,7 @@ public class ClearBrowsingDataPreferencesBasicTest {
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override
public void run() {
- ProfileSyncService.overrideForTests(new StubProfileSyncService());
+ ProfileSyncService.overrideForTests(new StubProfileSyncService(syncable));
}
});
}
« no previous file with comments | « chrome/android/java/strings/android_chrome_strings.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698