Index: chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncTest.java |
diff --git a/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncTest.java b/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncTest.java |
index 2a6fdc12881a0670e2d8e88ec678bb3b5c483b8e..3ac169eeb4e5b29350fca773af2b9c8b18bcfb7b 100644 |
--- a/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncTest.java |
+++ b/chrome/android/sync_shell/javatests/src/org/chromium/chrome/browser/sync/SyncTest.java |
@@ -7,7 +7,6 @@ package org.chromium.chrome.browser.sync; |
import android.accounts.Account; |
import android.app.Activity; |
import android.test.suitebuilder.annotation.LargeTest; |
-import android.util.Log; |
import org.chromium.base.ActivityState; |
import org.chromium.base.ApplicationStatus; |
@@ -15,13 +14,8 @@ import org.chromium.base.test.util.Feature; |
import org.chromium.chrome.browser.ChromeActivity; |
import org.chromium.chrome.test.util.browser.sync.SyncTestUtil; |
import org.chromium.content.browser.ContentViewCore; |
-import org.chromium.content.browser.test.util.Criteria; |
-import org.chromium.content.browser.test.util.CriteriaHelper; |
-import org.chromium.content.browser.test.util.JavaScriptUtils; |
import org.chromium.sync.AndroidSyncSettings; |
-import java.util.concurrent.TimeoutException; |
- |
/** |
* Test suite for Sync. |
*/ |
@@ -30,25 +24,6 @@ public class SyncTest extends SyncTestBase { |
@LargeTest |
@Feature({"Sync"}) |
- public void testGetAboutSyncInfoYieldsValidData() throws Throwable { |
- setUpTestAccountAndSignInToSync(); |
- |
- final SyncTestUtil.AboutSyncInfoGetter syncInfoGetter = |
- new SyncTestUtil.AboutSyncInfoGetter(getActivity()); |
- runTestOnUiThread(syncInfoGetter); |
- |
- boolean gotInfo = CriteriaHelper.pollForCriteria(new Criteria() { |
- @Override |
- public boolean isSatisfied() { |
- return !syncInfoGetter.getAboutInfo().isEmpty(); |
- } |
- }, SyncTestUtil.UI_TIMEOUT_MS, SyncTestUtil.CHECK_INTERVAL_MS); |
- |
- assertTrue("Couldn't get about info.", gotInfo); |
- } |
- |
- @LargeTest |
- @Feature({"Sync"}) |
public void testFlushDirectoryDoesntBreakSync() throws Throwable { |
setUpTestAccountAndSignInToSync(); |
final Activity activity = getActivity(); |
@@ -65,51 +40,6 @@ public class SyncTest extends SyncTestBase { |
@LargeTest |
@Feature({"Sync"}) |
- public void testAboutSyncPageDisplaysCurrentSyncStatus() throws InterruptedException { |
- setUpTestAccountAndSignInToSync(); |
- |
- loadUrl("chrome://sync"); |
- SyncTestUtil.AboutSyncInfoGetter aboutInfoGetter = |
- new SyncTestUtil.AboutSyncInfoGetter(getActivity()); |
- try { |
- runTestOnUiThread(aboutInfoGetter); |
- } catch (Throwable t) { |
- Log.w(TAG, |
- "Exception while trying to fetch about sync info from ProfileSyncService.", t); |
- fail("Unable to fetch sync info from ProfileSyncService."); |
- } |
- assertFalse("About sync info should not be empty.", |
- aboutInfoGetter.getAboutInfo().isEmpty()); |
- assertTrue("About sync info should have sync summary status.", |
- aboutInfoGetter.getAboutInfo().containsKey(SyncTestUtil.SYNC_SUMMARY_STATUS)); |
- final String expectedSyncSummary = |
- aboutInfoGetter.getAboutInfo().get(SyncTestUtil.SYNC_SUMMARY_STATUS); |
- |
- Criteria checker = new Criteria() { |
- @Override |
- public boolean isSatisfied() { |
- final ContentViewCore contentViewCore = getContentViewCore(getActivity()); |
- String innerHtml = ""; |
- try { |
- innerHtml = JavaScriptUtils.executeJavaScriptAndWaitForResult( |
- contentViewCore.getWebContents(), "document.documentElement.innerHTML"); |
- } catch (InterruptedException e) { |
- Log.w(TAG, "Interrupted while polling about:sync page for sync status.", e); |
- } catch (TimeoutException e) { |
- Log.w(TAG, "Interrupted while polling about:sync page for sync status.", e); |
- } |
- return innerHtml.contains(expectedSyncSummary); |
- } |
- |
- }; |
- boolean hadExpectedStatus = CriteriaHelper.pollForCriteria( |
- checker, SyncTestUtil.UI_TIMEOUT_MS, SyncTestUtil.CHECK_INTERVAL_MS); |
- assertTrue("Sync status not present on about sync page: " + expectedSyncSummary, |
- hadExpectedStatus); |
- } |
- |
- @LargeTest |
- @Feature({"Sync"}) |
public void testSignInAndOut() throws InterruptedException { |
Account account = setUpTestAccountAndSignInToSync(); |
@@ -138,7 +68,7 @@ public class SyncTest extends SyncTestBase { |
@Feature({"Sync"}) |
public void testDisableAndEnableSyncThroughAndroid() throws InterruptedException { |
Account account = setUpTestAccountAndSignInToSync(); |
- SyncTestUtil.waitForSyncActive(mContext); |
+ SyncTestUtil.waitForSyncActive(); |
String authority = AndroidSyncSettings.getContractAuthority(mContext); |