OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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.preferences.privacy; | 5 package org.chromium.chrome.browser.preferences.privacy; |
6 | 6 |
7 import static org.hamcrest.Matchers.containsString; | 7 import static org.hamcrest.Matchers.containsString; |
8 import static org.hamcrest.Matchers.not; | 8 import static org.hamcrest.Matchers.not; |
9 import static org.junit.Assert.assertThat; | 9 import static org.junit.Assert.assertThat; |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 @Rule | 42 @Rule |
43 public ChromeActivityTestRule<ChromeActivity> mActivityTestRule = | 43 public ChromeActivityTestRule<ChromeActivity> mActivityTestRule = |
44 new ChromeActivityTestRule<>(ChromeActivity.class); | 44 new ChromeActivityTestRule<>(ChromeActivity.class); |
45 | 45 |
46 private static final String GOOGLE_ACCOUNT = "Google Account"; | 46 private static final String GOOGLE_ACCOUNT = "Google Account"; |
47 private static final String OTHER_ACTIVITY = "other activity"; | 47 private static final String OTHER_ACTIVITY = "other activity"; |
48 private static final String SIGNED_IN_DEVICES = "signed-in devices"; | 48 private static final String SIGNED_IN_DEVICES = "signed-in devices"; |
49 | 49 |
50 @Before | 50 @Before |
51 public void setUp() throws InterruptedException { | 51 public void setUp() throws InterruptedException { |
52 SigninTestUtil.setUpAuthForTest(InstrumentationRegistry.getInstrumentati
on()); | 52 SigninTestUtil.setUpAuthForTest(); |
53 mActivityTestRule.startMainActivityOnBlankPage(); | 53 mActivityTestRule.startMainActivityOnBlankPage(); |
54 } | 54 } |
55 | 55 |
56 @After | 56 @After |
57 public void tearDown() throws Exception { | 57 public void tearDown() throws Exception { |
58 ProfileSyncService.overrideForTests(null); | 58 ProfileSyncService.overrideForTests(null); |
59 } | 59 } |
60 | 60 |
61 private static class StubProfileSyncService extends ProfileSyncService { | 61 private static class StubProfileSyncService extends ProfileSyncService { |
62 StubProfileSyncService() { | 62 StubProfileSyncService() { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 String historySummary = | 175 String historySummary = |
176 getCheckboxSummary(screen, ClearBrowsingDataPreferencesB
asic.PREF_HISTORY); | 176 getCheckboxSummary(screen, ClearBrowsingDataPreferencesB
asic.PREF_HISTORY); |
177 | 177 |
178 assertThat(cookiesSummary, containsString(GOOGLE_ACCOUNT)); | 178 assertThat(cookiesSummary, containsString(GOOGLE_ACCOUNT)); |
179 assertThat(historySummary, containsString(OTHER_ACTIVITY)); | 179 assertThat(historySummary, containsString(OTHER_ACTIVITY)); |
180 assertThat(historySummary, containsString(SIGNED_IN_DEVICES)); | 180 assertThat(historySummary, containsString(SIGNED_IN_DEVICES)); |
181 } | 181 } |
182 }); | 182 }); |
183 } | 183 } |
184 } | 184 } |
OLD | NEW |