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

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/sync/ui/PassphraseActivityTest.java

Issue 2872743003: Change AccountManagerHelper initialization
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.ui; 5 package org.chromium.chrome.browser.sync.ui;
6 6
7 import android.app.Instrumentation.ActivityMonitor; 7 import android.app.Instrumentation.ActivityMonitor;
8 import android.content.ComponentName; 8 import android.content.ComponentName;
9 import android.content.Context; 9 import android.content.Context;
10 import android.content.Intent; 10 import android.content.Intent;
(...skipping 25 matching lines...) Expand all
36 @RunWith(BaseJUnit4ClassRunner.class) 36 @RunWith(BaseJUnit4ClassRunner.class)
37 public class PassphraseActivityTest { 37 public class PassphraseActivityTest {
38 @Rule 38 @Rule
39 public NativeLibraryTestRule mActivityTestRule = new NativeLibraryTestRule() ; 39 public NativeLibraryTestRule mActivityTestRule = new NativeLibraryTestRule() ;
40 40
41 private Context mContext; 41 private Context mContext;
42 42
43 @Before 43 @Before
44 public void setUp() throws Exception { 44 public void setUp() throws Exception {
45 mContext = InstrumentationRegistry.getInstrumentation().getTargetContext (); 45 mContext = InstrumentationRegistry.getInstrumentation().getTargetContext ();
46 SigninTestUtil.setUpAuthForTest(InstrumentationRegistry.getInstrumentati on()); 46 SigninTestUtil.setUpAuthForTest();
47 ApplicationData.clearAppData(mContext); 47 ApplicationData.clearAppData(mContext);
48 mActivityTestRule.loadNativeLibraryAndInitBrowserProcess(); 48 mActivityTestRule.loadNativeLibraryAndInitBrowserProcess();
49 } 49 }
50 50
51 @After 51 @After
52 public void tearDown() throws Exception { 52 public void tearDown() throws Exception {
53 // Clear ProfileSyncService in case it was mocked. 53 // Clear ProfileSyncService in case it was mocked.
54 ProfileSyncService.overrideForTests(null); 54 ProfileSyncService.overrideForTests(null);
55 SigninTestUtil.resetSigninState(); 55 SigninTestUtil.resetSigninState();
56 SigninTestUtil.tearDownAuthForTest();
57 } 56 }
58 57
59 /** 58 /**
60 * This is a regression test for http://crbug.com/469890. 59 * This is a regression test for http://crbug.com/469890.
61 */ 60 */
62 @Test 61 @Test
63 @SmallTest 62 @SmallTest
64 @Feature({"Sync"}) 63 @Feature({"Sync"})
65 @RetryOnFailure 64 @RetryOnFailure
66 public void testCallbackAfterBackgrounded() throws Exception { 65 public void testCallbackAfterBackgrounded() throws Exception {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 private void overrideProfileSyncService() { 110 private void overrideProfileSyncService() {
112 ThreadUtils.runOnUiThreadBlocking(new Runnable() { 111 ThreadUtils.runOnUiThreadBlocking(new Runnable() {
113 @Override 112 @Override
114 public void run() { 113 public void run() {
115 // PSS has to be constructed on the UI thread. 114 // PSS has to be constructed on the UI thread.
116 ProfileSyncService.overrideForTests(new FakeProfileSyncService() ); 115 ProfileSyncService.overrideForTests(new FakeProfileSyncService() );
117 } 116 }
118 }); 117 });
119 } 118 }
120 } 119 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698