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

Side by Side Diff: chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/SyncTest.java

Issue 1081283003: [Sync] Fix invalidations on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove other call. Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.sync; 5 package org.chromium.chrome.browser.sync;
6 6
7 import android.accounts.Account; 7 import android.accounts.Account;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.test.suitebuilder.annotation.LargeTest; 9 import android.test.suitebuilder.annotation.LargeTest;
10 import android.util.Log; 10 import android.util.Log;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 @Override 85 @Override
86 public void run() { 86 public void run() {
87 mSyncController.stop(); 87 mSyncController.stop();
88 FakeServerHelper.deleteFakeServer(); 88 FakeServerHelper.deleteFakeServer();
89 } 89 }
90 }); 90 });
91 91
92 super.tearDown(); 92 super.tearDown();
93 } 93 }
94 94
95 /**
96 * This is a regression test for http://crbug.com/475299.
97 */
98 @LargeTest
99 @Feature({"Sync"})
100 public void testGcmInitialized() throws Throwable {
101 setupTestAccountAndSignInToSync(FOREIGN_SESSION_TEST_MACHINE_ID);
102 assertTrue(ChromeSigninController.get(mContext).isGcmInitialized());
103 }
104
95 @LargeTest 105 @LargeTest
96 @Feature({"Sync"}) 106 @Feature({"Sync"})
97 public void testGetAboutSyncInfoYieldsValidData() throws Throwable { 107 public void testGetAboutSyncInfoYieldsValidData() throws Throwable {
98 setupTestAccountAndSignInToSync(FOREIGN_SESSION_TEST_MACHINE_ID); 108 setupTestAccountAndSignInToSync(FOREIGN_SESSION_TEST_MACHINE_ID);
99 109
100 final SyncTestUtil.AboutSyncInfoGetter syncInfoGetter = 110 final SyncTestUtil.AboutSyncInfoGetter syncInfoGetter =
101 new SyncTestUtil.AboutSyncInfoGetter(getActivity()); 111 new SyncTestUtil.AboutSyncInfoGetter(getActivity());
102 runTestOnUiThread(syncInfoGetter); 112 runTestOnUiThread(syncInfoGetter);
103 113
104 boolean gotInfo = CriteriaHelper.pollForCriteria(new Criteria() { 114 boolean gotInfo = CriteriaHelper.pollForCriteria(new Criteria() {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 318
309 SyncTestUtil.verifySyncIsSignedIn(mContext, defaultTestAccount); 319 SyncTestUtil.verifySyncIsSignedIn(mContext, defaultTestAccount);
310 assertTrue("Sync everything should be enabled", 320 assertTrue("Sync everything should be enabled",
311 SyncTestUtil.isSyncEverythingEnabled(mContext)); 321 SyncTestUtil.isSyncEverythingEnabled(mContext));
312 } 322 }
313 323
314 private static ContentViewCore getContentViewCore(ChromeShellActivity activi ty) { 324 private static ContentViewCore getContentViewCore(ChromeShellActivity activi ty) {
315 return activity.getActiveContentViewCore(); 325 return activity.getActiveContentViewCore();
316 } 326 }
317 } 327 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698