Commit 236d7733 authored by Sky Malice's avatar Sky Malice Committed by Commit Bot

[Feed] Fix method names in FeedAppLifecycleTest.java

Bug: 910754
Change-Id: I6306a138923c709ec31cf7ee5c5fe907c6ed35ad
Reviewed-on: https://chromium-review.googlesource.com/c/1357566Reviewed-by: default avatarFilip Gorski <fgorski@chromium.org>
Commit-Queue: Sky Malice <skym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612876}
parent 352981c2
...@@ -108,14 +108,14 @@ public class FeedAppLifecycleTest { ...@@ -108,14 +108,14 @@ public class FeedAppLifecycleTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"InterestFeedContentSuggestions"}) @Feature({"InterestFeedContentSuggestions"})
public void construction_checks_active_tabbed_activities() { public void testConstructionChecksActiveTabbedActivities() {
verify(mAppLifecycleListener, times(1)).onEnterForeground(); verify(mAppLifecycleListener, times(1)).onEnterForeground();
} }
@Test @Test
@SmallTest @SmallTest
@Feature({"InterestFeedContentSuggestions"}) @Feature({"InterestFeedContentSuggestions"})
public void activity_state_changes_increment_state_counters() public void testActivityStateChangesIncrementStateCounters()
throws InterruptedException, TimeoutException { throws InterruptedException, TimeoutException {
assertEquals(0, assertEquals(0,
RecordHistogram.getHistogramValueCountForTesting( RecordHistogram.getHistogramValueCountForTesting(
...@@ -137,7 +137,7 @@ public class FeedAppLifecycleTest { ...@@ -137,7 +137,7 @@ public class FeedAppLifecycleTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"InterestFeedContentSuggestions"}) @Feature({"InterestFeedContentSuggestions"})
public void ntp_opening_triggers_initialize_only_once() throws InterruptedException { public void testNtpOpeningTriggersInitializeOnlyOnce() throws InterruptedException {
// We open to about:blank initially so we shouldn't have called initialize() yet. // We open to about:blank initially so we shouldn't have called initialize() yet.
verify(mAppLifecycleListener, times(0)).initialize(); verify(mAppLifecycleListener, times(0)).initialize();
mActivityTestRule.loadUrl(UrlConstants.NTP_URL); mActivityTestRule.loadUrl(UrlConstants.NTP_URL);
...@@ -154,7 +154,7 @@ public class FeedAppLifecycleTest { ...@@ -154,7 +154,7 @@ public class FeedAppLifecycleTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"InterestFeedContentSuggestions"}) @Feature({"InterestFeedContentSuggestions"})
public void history_deletion_triggers_clear_all() throws InterruptedException { public void testHistoryDeletionTriggersClearAll() throws InterruptedException {
verify(mAppLifecycleListener, times(0)).onClearAll(); verify(mAppLifecycleListener, times(0)).onClearAll();
mAppLifecycle.onHistoryDeleted(); mAppLifecycle.onHistoryDeleted();
verify(mAppLifecycleListener, times(1)).onClearAll(); verify(mAppLifecycleListener, times(1)).onClearAll();
...@@ -167,7 +167,7 @@ public class FeedAppLifecycleTest { ...@@ -167,7 +167,7 @@ public class FeedAppLifecycleTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"InterestFeedContentSuggestions"}) @Feature({"InterestFeedContentSuggestions"})
public void cached_data_removal_triggers_clear_all() throws InterruptedException { public void testCachedDataRemovalTriggersClearAll() throws InterruptedException {
verify(mAppLifecycleListener, times(0)).onClearAll(); verify(mAppLifecycleListener, times(0)).onClearAll();
mAppLifecycle.onCachedDataCleared(); mAppLifecycle.onCachedDataCleared();
verify(mAppLifecycleListener, times(1)).onClearAll(); verify(mAppLifecycleListener, times(1)).onClearAll();
...@@ -180,7 +180,7 @@ public class FeedAppLifecycleTest { ...@@ -180,7 +180,7 @@ public class FeedAppLifecycleTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"InterestFeedContentSuggestions"}) @Feature({"InterestFeedContentSuggestions"})
public void signout_triggers_clear_all() throws InterruptedException { public void testSignoutTriggersClearAll() throws InterruptedException {
verify(mAppLifecycleListener, times(0)).onClearAll(); verify(mAppLifecycleListener, times(0)).onClearAll();
mAppLifecycle.onSignedOut(); mAppLifecycle.onSignedOut();
verify(mAppLifecycleListener, times(1)).onClearAll(); verify(mAppLifecycleListener, times(1)).onClearAll();
...@@ -193,7 +193,7 @@ public class FeedAppLifecycleTest { ...@@ -193,7 +193,7 @@ public class FeedAppLifecycleTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"InterestFeedContentSuggestions"}) @Feature({"InterestFeedContentSuggestions"})
public void signin_triggers_clear_all() throws InterruptedException { public void testSigninTriggersClearAll() throws InterruptedException {
verify(mAppLifecycleListener, times(0)).onClearAll(); verify(mAppLifecycleListener, times(0)).onClearAll();
mAppLifecycle.onSignedIn(); mAppLifecycle.onSignedIn();
verify(mAppLifecycleListener, times(1)).onClearAll(); verify(mAppLifecycleListener, times(1)).onClearAll();
...@@ -206,7 +206,7 @@ public class FeedAppLifecycleTest { ...@@ -206,7 +206,7 @@ public class FeedAppLifecycleTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"InterestFeedContentSuggestions"}) @Feature({"InterestFeedContentSuggestions"})
public void second_window_does_not_trigger_foreground_or_background() public void testSecondWindowDoesNotTriggerForegroundOrBackground()
throws InterruptedException, TimeoutException { throws InterruptedException, TimeoutException {
verify(mAppLifecycleListener, times(1)).onEnterForeground(); verify(mAppLifecycleListener, times(1)).onEnterForeground();
...@@ -231,7 +231,7 @@ public class FeedAppLifecycleTest { ...@@ -231,7 +231,7 @@ public class FeedAppLifecycleTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"InterestFeedContentSuggestions"}) @Feature({"InterestFeedContentSuggestions"})
public void multi_window_does_not_cause_multiple_initialize() throws InterruptedException { public void testMultiWindowDoesNotCauseMultipleInitialize() throws InterruptedException {
mActivityTestRule.loadUrl(UrlConstants.NTP_URL); mActivityTestRule.loadUrl(UrlConstants.NTP_URL);
verify(mAppLifecycleListener, times(1)).initialize(); verify(mAppLifecycleListener, times(1)).initialize();
...@@ -245,7 +245,7 @@ public class FeedAppLifecycleTest { ...@@ -245,7 +245,7 @@ public class FeedAppLifecycleTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"InterestFeedContentSuggestions"}) @Feature({"InterestFeedContentSuggestions"})
public void resume_triggers_scheduler_foregrounded() public void testResumeTriggersSchedulerForegrounded()
throws InterruptedException, TimeoutException { throws InterruptedException, TimeoutException {
verify(mFeedScheduler, times(1)).onForegrounded(); verify(mFeedScheduler, times(1)).onForegrounded();
signalActivityResume(mActivity); signalActivityResume(mActivity);
...@@ -255,7 +255,7 @@ public class FeedAppLifecycleTest { ...@@ -255,7 +255,7 @@ public class FeedAppLifecycleTest {
@Test @Test
@SmallTest @SmallTest
@Feature({"InterestFeedContentSuggestions"}) @Feature({"InterestFeedContentSuggestions"})
public void clear_data_after_disabling_does_not_crash() { public void testClearDataAfterDisablingDoesNotCrash() {
ThreadUtils.runOnUiThreadBlocking(() -> { ThreadUtils.runOnUiThreadBlocking(() -> {
FeedProcessScopeFactory.clearFeedProcessScopeForTesting(); FeedProcessScopeFactory.clearFeedProcessScopeForTesting();
PrefServiceBridge.getInstance().setBoolean(Pref.NTP_ARTICLES_SECTION_ENABLED, false); PrefServiceBridge.getInstance().setBoolean(Pref.NTP_ARTICLES_SECTION_ENABLED, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment