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

Side by Side Diff: chrome/android/junit/src/org/chromium/chrome/browser/ChromeBackupAgentTest.java

Issue 2043233002: [M52] Fix android test compile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/ChromeBackupIntegrationTest.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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; 5 package org.chromium.chrome.browser;
6 6
7 import static org.hamcrest.CoreMatchers.equalTo; 7 import static org.hamcrest.CoreMatchers.equalTo;
8 import static org.hamcrest.CoreMatchers.nullValue; 8 import static org.hamcrest.CoreMatchers.nullValue;
9 import static org.junit.Assert.assertThat; 9 import static org.junit.Assert.assertThat;
10 10
11 import android.accounts.Account; 11 import android.accounts.Account;
12 import android.accounts.AccountManager; 12 import android.accounts.AccountManager;
13 import android.content.Context; 13 import android.content.Context;
14 import android.content.SharedPreferences; 14 import android.content.SharedPreferences;
15 import android.preference.PreferenceManager; 15 import android.preference.PreferenceManager;
16 16
17 import org.chromium.base.ContextUtils;
17 import org.chromium.testing.local.LocalRobolectricTestRunner; 18 import org.chromium.testing.local.LocalRobolectricTestRunner;
19 import org.junit.Before;
18 import org.junit.Test; 20 import org.junit.Test;
19 import org.junit.runner.RunWith; 21 import org.junit.runner.RunWith;
20 import org.robolectric.Robolectric; 22 import org.robolectric.Robolectric;
21 import org.robolectric.annotation.Config; 23 import org.robolectric.annotation.Config;
22 24
23 /** 25 /**
24 * Unit tests for {@link org.chromium.chrome.browser.ChromeBackupAgent}. 26 * Unit tests for {@link org.chromium.chrome.browser.ChromeBackupAgent}.
25 */ 27 */
26 @RunWith(LocalRobolectricTestRunner.class) 28 @RunWith(LocalRobolectricTestRunner.class)
27 @Config(manifest = Config.NONE) 29 @Config(manifest = Config.NONE)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 97
96 new ChromeTestBackupAgent().onRestoreFinished(); 98 new ChromeTestBackupAgent().onRestoreFinished();
97 99
98 // Check that we haven't restored any preferences 100 // Check that we haven't restored any preferences
99 assertThat(sharedPrefs.getBoolean("crash_dump_upload", true), equalTo(tr ue)); 101 assertThat(sharedPrefs.getBoolean("crash_dump_upload", true), equalTo(tr ue));
100 assertThat(sharedPrefs.getString("google.services.username", null), null Value()); 102 assertThat(sharedPrefs.getString("google.services.username", null), null Value());
101 assertThat(sharedPrefs.getString("junk", null), nullValue()); 103 assertThat(sharedPrefs.getString("junk", null), nullValue());
102 assertThat(sharedPrefs.getString("first_run_signin_account_name", null), nullValue()); 104 assertThat(sharedPrefs.getString("first_run_signin_account_name", null), nullValue());
103 } 105 }
104 } 106 }
OLDNEW
« no previous file with comments | « chrome/android/javatests/src/org/chromium/chrome/browser/ChromeBackupIntegrationTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698