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

Unified Diff: components/sync/android/javatests/src/org/chromium/components/sync/AndroidSyncSettingsTest.java

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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: components/sync/android/javatests/src/org/chromium/components/sync/AndroidSyncSettingsTest.java
diff --git a/sync/android/javatests/src/org/chromium/sync/AndroidSyncSettingsTest.java b/components/sync/android/javatests/src/org/chromium/components/sync/AndroidSyncSettingsTest.java
similarity index 95%
rename from sync/android/javatests/src/org/chromium/sync/AndroidSyncSettingsTest.java
rename to components/sync/android/javatests/src/org/chromium/components/sync/AndroidSyncSettingsTest.java
index 48b901b1555ee9d141c0e64848a96344ceca1606..d7ca5b9b23ed5fccd15260d1eff45067fc2c9742 100644
--- a/sync/android/javatests/src/org/chromium/sync/AndroidSyncSettingsTest.java
+++ b/components/sync/android/javatests/src/org/chromium/components/sync/AndroidSyncSettingsTest.java
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package org.chromium.sync;
+package org.chromium.components.sync;
import android.accounts.Account;
import android.content.Context;
@@ -13,18 +13,17 @@ import android.test.suitebuilder.annotation.SmallTest;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature;
-import org.chromium.sync.AndroidSyncSettings.AndroidSyncSettingsObserver;
-import org.chromium.sync.signin.AccountManagerHelper;
-import org.chromium.sync.test.util.AccountHolder;
-import org.chromium.sync.test.util.MockAccountManager;
-import org.chromium.sync.test.util.MockSyncContentResolverDelegate;
+import org.chromium.components.sync.AndroidSyncSettings.AndroidSyncSettingsObserver;
+import org.chromium.components.sync.signin.AccountManagerHelper;
+import org.chromium.components.sync.test.util.AccountHolder;
+import org.chromium.components.sync.test.util.MockAccountManager;
+import org.chromium.components.sync.test.util.MockSyncContentResolverDelegate;
/**
* Tests for AndroidSyncSettings.
*/
@DisabledTest(message = "https://crbug.com/605567")
public class AndroidSyncSettingsTest extends InstrumentationTestCase {
-
private static class CountingMockSyncContentResolverDelegate
extends MockSyncContentResolverDelegate {
private int mGetMasterSyncAutomaticallyCalls;
@@ -167,13 +166,12 @@ public class AndroidSyncSettingsTest extends InstrumentationTestCase {
public void testToggleMasterSyncFromSettings() throws InterruptedException {
mSyncContentResolverDelegate.setMasterSyncAutomatically(true);
mSyncContentResolverDelegate.waitForLastNotificationCompleted();
- assertTrue("master sync should be set",
- AndroidSyncSettings.isMasterSyncEnabled(mContext));
+ assertTrue("master sync should be set", AndroidSyncSettings.isMasterSyncEnabled(mContext));
mSyncContentResolverDelegate.setMasterSyncAutomatically(false);
mSyncContentResolverDelegate.waitForLastNotificationCompleted();
- assertFalse("master sync should be unset",
- AndroidSyncSettings.isMasterSyncEnabled(mContext));
+ assertFalse(
+ "master sync should be unset", AndroidSyncSettings.isMasterSyncEnabled(mContext));
}
@SmallTest
@@ -247,8 +245,8 @@ public class AndroidSyncSettingsTest extends InstrumentationTestCase {
AndroidSyncSettings.updateAccount(mContext, mAlternateAccount);
enableChromeSyncOnUiThread();
mSyncContentResolverDelegate.waitForLastNotificationCompleted();
- assertTrue("alternate account should be synced",
- AndroidSyncSettings.isSyncEnabled(mContext));
+ assertTrue(
+ "alternate account should be synced", AndroidSyncSettings.isSyncEnabled(mContext));
disableChromeSyncOnUiThread();
mSyncContentResolverDelegate.waitForLastNotificationCompleted();
@@ -259,8 +257,8 @@ public class AndroidSyncSettingsTest extends InstrumentationTestCase {
// Ensure we don't erroneously re-use cached data.
AndroidSyncSettings.updateAccount(mContext, null);
- assertFalse("null account should not be synced",
- AndroidSyncSettings.isSyncEnabled(mContext));
+ assertFalse(
+ "null account should not be synced", AndroidSyncSettings.isSyncEnabled(mContext));
}
@SmallTest

Powered by Google App Engine
This is Rietveld 408576698