From e1d37e70e949d04f3eee4cb312a08ef58a590ca8 Mon Sep 17 00:00:00 2001 From: Mark Schillaci Date: Wed, 9 Feb 2022 19:43:54 +0000 Subject: [PATCH] Rename DummyUiActivity to BlankUiTestActivity This CL renames the DummyUiActivity class to BlankUiTestActivity. Per Google's documentation and style guidelines, the words "dummy" and "dumb down" should be avoided. For this reason we are replacing the DummyUiActivity with the more appropriately named BlankUiTestActivity. We also make the following renames: DummyUiActivityTestRule -> BlankUiTestActivityTestRule DummySettingsForTest -> PlaceholderSettingsForTest This CL also makes updates to comments and method names where needed to match these changes. Bug: 1295312 Change-Id: Ib712a292e0dcee32a97e9d7c487af2fb920f5084 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3445111 Reviewed-by: Ted Choc Reviewed-by: Theresa Sullivan Reviewed-by: Yaron Friedman Reviewed-by: Michael Thiessen Commit-Queue: Mark Schillaci Cr-Commit-Position: refs/heads/main@{#969056} --- .../AccessorySheetRenderTest.java | 10 +++++----- .../KeyboardAccessoryTabLayoutViewTest.java | 8 ++++---- .../BottomBarViewBinderTest.java | 4 ++-- .../ExploreSurfaceViewBinderTest.java | 6 +++--- .../SecondaryTasksSurfaceViewBinderTest.java | 4 ++-- .../TasksSurfaceViewBinderTest.java | 4 ++-- .../tasks/SingleTabViewBinderTest.java | 4 ++-- .../browser/tasks/TasksViewBinderTest.java | 4 ++-- .../LargeMessageCardViewBinderTest.java | 4 ++-- .../MessageCardProviderTest.java | 4 ++-- .../MessageCardViewBinderTest.java | 4 ++-- .../tab_management/TabGridDialogViewTest.java | 6 +++--- .../TabGridPanelViewBinderTest.java | 4 ++-- .../TabGroupUiViewBinderTest.java | 4 ++-- .../TabListContainerViewBinderTest.java | 10 +++++----- .../tab_management/TabListViewHolderTest.java | 4 ++-- .../TabSelectionEditorLayoutBinderTest.java | 4 ++-- chrome/android/javatests/AndroidManifest.xml | 2 +- ...owerBookmarkShoppingItemRowRenderTest.java | 6 +++--- .../PowerBookmarkShoppingItemRowTest.java | 4 ++-- .../PowerBookmarkTagChipListTest.java | 4 ++-- .../bottombar/OverlayPanelBaseTest.java | 6 +++--- .../OverlayPanelEventFilterTest.java | 6 +++--- .../bottombar/OverlayPanelManagerTest.java | 6 +++--- .../ContextMenuChipControllerTest.java | 8 ++++---- .../ContextMenuHeaderViewTest.java | 8 ++++---- .../contextmenu/ContextMenuItemViewTest.java | 8 ++++---- .../contextmenu/ContextMenuRenderTest.java | 8 ++++---- .../dialogs/DownloadLocationDialogTest.java | 4 ++-- .../browser/init/FirstDrawDetectorTest.java | 8 ++++---- ...nIntentBehaviorMetricsIntegrationTest.java | 6 +++--- .../ModalDialogViewRenderTest.java | 8 ++++---- .../IncognitoDescriptionViewRenderTest.java | 6 +++--- ...pedIncognitoDescriptionViewRenderTest.java | 6 +++--- .../omnibox/status/StatusViewRenderTest.java | 4 ++-- .../omnibox/status/StatusViewTest.java | 4 ++-- ...sistantVoiceSearchConsentUiRenderTest.java | 4 ++-- .../settings/PasswordSettingsTest.java | 13 ++++++------ .../AndroidPaymentAppFinderUnitTest.java | 4 ++-- .../signin/SyncConsentFragmentTest.java | 6 +++--- .../StatusIndicatorViewBinderTest.java | 8 ++++---- .../suggestions/tile/TileRendererTest.java | 6 +++--- .../ui/PassphraseTypeDialogFragmentTest.java | 4 ++-- .../browser/toolbar/HomeButtonTest.java | 4 ++-- .../AdaptiveButtonActionMenuRenderTest.java | 10 +++++----- .../top/TabSwitcherActionMenuRenderTest.java | 8 ++++---- .../InputEventValidatorManualTest.java | 4 ++-- .../BottomSheetToolbarViewBinderTest.java | 4 ++-- .../MerchantTrustMessageViewTest.java | 8 ++++---- .../ContinuousSearchChipViewTest.java | 6 +++--- .../ContinuousSearchUiTest.java | 6 +++--- .../download/home/DownloadActivityV2Test.java | 4 ++-- .../ImageDescriptionsControllerTest.java | 4 ++-- .../ImageDescriptionsDialogTest.java | 4 ++-- ...nitoReauthSettingSwitchPreferenceTest.java | 6 +++--- .../reauth/IncognitoReauthViewTest.java | 4 ++-- .../PasswordEditDialogViewTest.java | 6 +++--- chrome/browser/settings/BUILD.gn | 2 +- .../settings/ChromeBasePreferenceTest.java | 4 ++-- .../ChromeImageViewPreferenceTest.java | 2 +- .../settings/ManagedPreferencesUtilsTest.java | 2 +- ...t.java => PlaceholderSettingsForTest.java} | 6 +++--- .../browser/share/SaveBitmapDelegateTest.java | 6 +++--- .../LongScreenshotsMediatorTest.java | 6 +++--- .../ScreenshotShareSheetViewTest.java | 4 ++-- ...omeProvidedSharingOptionsProviderTest.java | 6 +++--- .../ShareSheetBottomSheetContentTest.java | 6 +++--- .../ShareSheetPropertyModelBuilderTest.java | 6 +++--- .../services/ProfileDataCacheRenderTest.java | 4 ++-- .../ProfileDataCacheWithBadgeRenderTest.java | 4 ++-- .../AppMenuItemViewBinderRenderTest.java | 10 +++++----- .../ui/appmenu/AppMenuItemViewBinderTest.java | 6 +++--- .../browser/ui/appmenu/AppMenuTest.java | 8 ++++---- .../chrome/browser/logo/LogoViewTest.java | 4 ++-- .../InstanceSwitcherCoordinatorTest.java | 5 ++--- .../TargetSelectorCoordinatorTest.java | 5 ++--- .../settings/ThemeSettingsFragmentTest.java | 4 ++-- .../ConfirmImportSyncDataDialogTest.java | 6 +++--- ...mManagedSyncDataDialogIntegrationTest.java | 8 ++++---- .../ConfirmSyncDataIntegrationTest.java | 4 ++-- .../ui/signin/SignOutDialogRenderTest.java | 4 ++-- .../AccountPickerDialogTest.java | 4 ++-- .../ui/signin/fre/FreUMADialogTest.java | 6 +++--- .../toolbar/ToolbarProgressBarTest.java | 4 ++-- .../webid/AccountSelectionViewTest.java | 8 ++++---- .../ui/messages/snackbar/SnackbarTest.java | 6 +++--- .../UserEducationHelperTest.java | 6 +++--- .../video_tutorials/iph/VideoIPHTest.java | 6 +++--- .../languages/LanguagePickerTest.java | 6 +++--- .../list/TutorialListCoordinatorTest.java | 6 +++--- .../player/VideoPlayerViewBinderTest.java | 6 +++--- .../chrome/test/util/browser/Features.java | 2 +- .../bottomsheet/BottomSheetObserverTest.java | 6 +++--- .../ContactsPickerDialogTest.java | 6 +++--- .../modaldialog/AppModalPresenterTest.java | 6 +++--- .../modaldialog/ModalDialogViewTest.java | 6 +++--- .../photo_picker/PhotoPickerDialogTest.java | 4 ++-- .../share/ShareImageFileUtilsTest.java | 4 ++-- .../widget/MoreProgressButtonTest.java | 6 +++--- .../widget/PromoDialogRenderTest.java | 6 +++--- .../browser_ui/widget/PromoDialogTest.java | 6 +++--- .../widget/RadioButtonRenderTest.java | 6 +++--- ...ButtonWithDescriptionAndAuxButtonTest.java | 6 +++--- .../widget/RadioButtonWithEditTextTest.java | 6 +++--- .../widget/RadioButtonWithIconRenderTest.java | 6 +++--- .../widget/listmenu/ListMenuButtonTest.java | 6 +++--- .../widget/listmenu/ListMenuRenderTest.java | 8 ++++---- .../widget/promo/PromoCardImpressionTest.java | 6 +++--- .../widget/promo/PromoCardViewRenderTest.java | 6 +++--- .../browser_ui/widget/scrim/ScrimTest.java | 6 +++--- .../delegate/ColorPickerDialogRenderTest.java | 6 +++--- .../ExternalNavigationHandlerTest.java | 10 +++++----- .../messages/MessageBannerRenderTest.java | 6 +++--- .../messages/MessageBannerViewTest.java | 6 +++--- .../messages/SingleActionMessageTest.java | 6 +++--- .../player/PaintPreviewPlayerTest.java | 4 ++-- docs/ui/android/mvc_testing.md | 2 +- docs/ui/android/night_mode.md | 6 +++--- ui/android/BUILD.gn | 4 ++-- ui/android/DEPS | 2 +- .../ui/widget/TextViewWithTightWrapTest.java | 4 ++-- .../ui/base/ClipboardAndroidTest.java | 4 ++-- ...Activity.java => BlankUiTestActivity.java} | 4 ++-- ....java => BlankUiTestActivityTestCase.java} | 20 +++++++++---------- .../ui/test/util/NightModeTestUtils.java | 8 ++++---- .../chromium/ui/test/util/RenderTestRule.java | 2 +- 126 files changed, 352 insertions(+), 353 deletions(-) rename chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/{DummySettingsForTest.java => PlaceholderSettingsForTest.java} (76%) rename ui/android/javatests/src/org/chromium/ui/test/util/{DummyUiActivity.java => BlankUiTestActivity.java} (94%) rename ui/android/javatests/src/org/chromium/ui/test/util/{DummyUiActivityTestCase.java => BlankUiTestActivityTestCase.java} (79%) diff --git a/chrome/android/features/keyboard_accessory/javatests/src/org/chromium/chrome/browser/keyboard_accessory/sheet_component/AccessorySheetRenderTest.java b/chrome/android/features/keyboard_accessory/javatests/src/org/chromium/chrome/browser/keyboard_accessory/sheet_component/AccessorySheetRenderTest.java index 9bf811909a5d91..ddf898eac56c3a 100644 --- a/chrome/android/features/keyboard_accessory/javatests/src/org/chromium/chrome/browser/keyboard_accessory/sheet_component/AccessorySheetRenderTest.java +++ b/chrome/android/features/keyboard_accessory/javatests/src/org/chromium/chrome/browser/keyboard_accessory/sheet_component/AccessorySheetRenderTest.java @@ -67,7 +67,7 @@ import org.chromium.ui.modelutil.LazyConstructionPropertyMcp; import org.chromium.ui.modelutil.ListModel; import org.chromium.ui.modelutil.PropertyModel; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.NightModeTestUtils; import org.chromium.ui.test.util.ViewUtils; @@ -94,8 +94,8 @@ public class AccessorySheetRenderTest { // No @Rule since we only need the launching helpers. Adding the rule to the chain breaks with // any ParameterizedRunnerDelegate. - private BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + private BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Rule public final ChromeRenderTestRule mRenderTestRule = @@ -105,7 +105,7 @@ public AccessorySheetRenderTest(boolean nightModeEnabled, boolean useRtlLayout) FeatureList.setTestFeatures( Collections.singletonMap(ChromeFeatureList.AUTOFILL_KEYBOARD_ACCESSORY, true)); setRtlForTesting(useRtlLayout); - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); mRenderTestRule.setVariantPrefix(useRtlLayout ? "RTL" : "LTR"); } @@ -144,7 +144,7 @@ public void setUp() throws InterruptedException { @After public void tearDown() { - NightModeTestUtils.tearDownNightModeForDummyUiActivity(); + NightModeTestUtils.tearDownNightModeForBlankUiTestActivity(); setRtlForTesting(false); try { ApplicationTestUtils.finishActivity(mActivityTestRule.getActivity()); diff --git a/chrome/android/features/keyboard_accessory/javatests/src/org/chromium/chrome/browser/keyboard_accessory/tab_layout_component/KeyboardAccessoryTabLayoutViewTest.java b/chrome/android/features/keyboard_accessory/javatests/src/org/chromium/chrome/browser/keyboard_accessory/tab_layout_component/KeyboardAccessoryTabLayoutViewTest.java index e04536a387e38c..1d84da1044db91 100644 --- a/chrome/android/features/keyboard_accessory/javatests/src/org/chromium/chrome/browser/keyboard_accessory/tab_layout_component/KeyboardAccessoryTabLayoutViewTest.java +++ b/chrome/android/features/keyboard_accessory/javatests/src/org/chromium/chrome/browser/keyboard_accessory/tab_layout_component/KeyboardAccessoryTabLayoutViewTest.java @@ -32,15 +32,15 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.ui.modelutil.ListModel; import org.chromium.ui.modelutil.PropertyModel; -import org.chromium.ui.test.util.DummyUiActivity; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivity; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * View tests for the keyboard accessory tab layout component. */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) -public class KeyboardAccessoryTabLayoutViewTest extends DummyUiActivityTestCase { +public class KeyboardAccessoryTabLayoutViewTest extends BlankUiTestActivityTestCase { private PropertyModel mModel; private KeyboardAccessoryTabLayoutView mView; @@ -60,7 +60,7 @@ private CharSequence getTabDescriptionAt(int position) { @BeforeClass public static void setUpBeforeActivityLaunched() { - DummyUiActivity.setTestLayout(R.layout.keyboard_accessory_tabs); + BlankUiTestActivity.setTestLayout(R.layout.keyboard_accessory_tabs); } @Override diff --git a/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/BottomBarViewBinderTest.java b/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/BottomBarViewBinderTest.java index 8b920800cd4aed..3a2d671073d6eb 100644 --- a/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/BottomBarViewBinderTest.java +++ b/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/BottomBarViewBinderTest.java @@ -30,14 +30,14 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.util.concurrent.atomic.AtomicBoolean; /** Tests for {@link BottomBarViewBinder}. */ @SuppressWarnings("ConstantConditions") @RunWith(ChromeJUnit4ClassRunner.class) -public class BottomBarViewBinderTest extends DummyUiActivityTestCase { +public class BottomBarViewBinderTest extends BlankUiTestActivityTestCase { @SuppressWarnings("unused") private BottomBarCoordinator mBottomBarCoordinator; private TabLayout mTabLayout; diff --git a/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/ExploreSurfaceViewBinderTest.java b/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/ExploreSurfaceViewBinderTest.java index 0ebc8b261ecdf2..0e68adefcded94 100644 --- a/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/ExploreSurfaceViewBinderTest.java +++ b/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/ExploreSurfaceViewBinderTest.java @@ -71,9 +71,9 @@ public class ExploreSurfaceViewBinderTest { public void setUp() throws Exception { mActivityTestRule.startMainActivityFromLauncher(); - // TODO(crbug.com/1025296): Investigate to use DummyUiActivityTestCase. We can not do that - // since mocked FeedSurfaceCoordinator does not work as expected in release build (works - // well in debug build). + // TODO(crbug.com/1025296): Investigate to use BlankUiTestActivityTestCase. We can not do + // that since mocked FeedSurfaceCoordinator does not work as expected in release build + // (works well in debug build). TestThreadUtils.runOnUiThreadBlocking(() -> { mPropertyModel = new PropertyModel(StartSurfaceProperties.ALL_KEYS); mExploreSurfaceCoordinatorFactory = new ExploreSurfaceCoordinatorFactory( diff --git a/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/SecondaryTasksSurfaceViewBinderTest.java b/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/SecondaryTasksSurfaceViewBinderTest.java index 0bfa9a80171087..9f5249331f1747 100644 --- a/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/SecondaryTasksSurfaceViewBinderTest.java +++ b/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/SecondaryTasksSurfaceViewBinderTest.java @@ -29,11 +29,11 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** Tests for {@link SecondaryTasksSurfaceViewBinder}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class SecondaryTasksSurfaceViewBinderTest extends DummyUiActivityTestCase { +public class SecondaryTasksSurfaceViewBinderTest extends BlankUiTestActivityTestCase { private ViewGroup mParentView; private View mTasksSurfaceView; private View mTopToolbarPlaceholderView; diff --git a/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/TasksSurfaceViewBinderTest.java b/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/TasksSurfaceViewBinderTest.java index 4d0f6221ae1359..4f9d45796637a6 100644 --- a/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/TasksSurfaceViewBinderTest.java +++ b/chrome/android/features/start_surface/internal/javatests/src/org/chromium/chrome/features/start_surface/TasksSurfaceViewBinderTest.java @@ -28,11 +28,11 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** Tests for {@link TasksSurfaceViewBinder}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class TasksSurfaceViewBinderTest extends DummyUiActivityTestCase { +public class TasksSurfaceViewBinderTest extends BlankUiTestActivityTestCase { private ViewGroup mParentView; private ViewGroup mTasksSurfaceView; private View mTopToolbarPlaceholderView; diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/SingleTabViewBinderTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/SingleTabViewBinderTest.java index c03f1f13de9eb1..da45b80ff70465 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/SingleTabViewBinderTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/SingleTabViewBinderTest.java @@ -35,11 +35,11 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** Tests for {@link SingleTabViewBinder}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class SingleTabViewBinderTest extends DummyUiActivityTestCase { +public class SingleTabViewBinderTest extends BlankUiTestActivityTestCase { private SingleTabView mSingleTabView; private PropertyModelChangeProcessor mPropertyModelChangeProcessor; private PropertyModel mPropertyModel; diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/TasksViewBinderTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/TasksViewBinderTest.java index 28db02d0f6cbbe..ca4a6cdf0a12f0 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/TasksViewBinderTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/TasksViewBinderTest.java @@ -56,13 +56,13 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.util.concurrent.atomic.AtomicBoolean; /** Tests for {@link TasksViewBinder}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class TasksViewBinderTest extends DummyUiActivityTestCase { +public class TasksViewBinderTest extends BlankUiTestActivityTestCase { private TasksView mTasksView; private PropertyModel mTasksViewPropertyModel; private AtomicBoolean mViewClicked = new AtomicBoolean(); diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/LargeMessageCardViewBinderTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/LargeMessageCardViewBinderTest.java index abe267ac5458a4..806c0c820ddfed 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/LargeMessageCardViewBinderTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/LargeMessageCardViewBinderTest.java @@ -28,7 +28,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.widget.ButtonCompat; import org.chromium.ui.widget.ChromeImageView; @@ -38,7 +38,7 @@ * Tests for {@link LargeMessageCardViewBinder}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class LargeMessageCardViewBinderTest extends DummyUiActivityTestCase { +public class LargeMessageCardViewBinderTest extends BlankUiTestActivityTestCase { private static final String TITLE_TEXT = "titleText"; private static final String ACTION_TEXT = "actionText"; private static final String DESCRIPTION_TEXT = "descriptionText"; diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/MessageCardProviderTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/MessageCardProviderTest.java index 7c4f522a95cea1..8c6f78963d5ec0 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/MessageCardProviderTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/MessageCardProviderTest.java @@ -36,7 +36,7 @@ import org.chromium.ui.modelutil.LayoutViewBuilder; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.SimpleRecyclerViewAdapter; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; @@ -45,7 +45,7 @@ * Integration tests for MessageCardProvider component. */ @Features.DisableFeatures(ChromeFeatureList.TAB_TO_GTS_ANIMATION) -public class MessageCardProviderTest extends DummyUiActivityTestCase { +public class MessageCardProviderTest extends BlankUiTestActivityTestCase { private static final int SUGGESTED_TAB_COUNT = 2; @Rule diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/MessageCardViewBinderTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/MessageCardViewBinderTest.java index de3252c49d1ef7..d6b6b249b74a57 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/MessageCardViewBinderTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/MessageCardViewBinderTest.java @@ -28,7 +28,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.util.concurrent.atomic.AtomicBoolean; @@ -36,7 +36,7 @@ * Tests for {@link MessageCardViewBinder}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class MessageCardViewBinderTest extends DummyUiActivityTestCase { +public class MessageCardViewBinderTest extends BlankUiTestActivityTestCase { private static final String ACTION_TEXT = "actionText"; private static final String DESCRIPTION_TEXT = "descriptionText"; private static final String DISMISS_BUTTON_CONTENT_DESCRIPTION = "dismiss"; diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogViewTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogViewTest.java index 5f8ee309dfee87..6bd115a7f53ce5 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogViewTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogViewTest.java @@ -31,15 +31,15 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.components.browser_ui.widget.scrim.ScrimCoordinator; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.util.concurrent.atomic.AtomicReference; /** - * DummyUiActivity Tests for the {@link TabGridDialogView}. + * BlankUiTestActivity Tests for the {@link TabGridDialogView}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class TabGridDialogViewTest extends DummyUiActivityTestCase { +public class TabGridDialogViewTest extends BlankUiTestActivityTestCase { private int mToolbarHeight; private int mTopMargin; private int mSideMargin; diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridPanelViewBinderTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridPanelViewBinderTest.java index 8fb36c639a45c1..1e249ea43c776e 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridPanelViewBinderTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGridPanelViewBinderTest.java @@ -40,7 +40,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.widget.ChromeImageView; import java.util.concurrent.atomic.AtomicBoolean; @@ -49,7 +49,7 @@ * Tests for {@link TabGridPanelViewBinder}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class TabGridPanelViewBinderTest extends DummyUiActivityTestCase { +public class TabGridPanelViewBinderTest extends BlankUiTestActivityTestCase { private static final String TAG = "TGPVBT"; private static final int CONTENT_TOP_MARGIN = 56; diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiViewBinderTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiViewBinderTest.java index c7dad25f27d6db..6ff4acaa9ab1b8 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiViewBinderTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiViewBinderTest.java @@ -33,7 +33,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.util.concurrent.atomic.AtomicBoolean; @@ -41,7 +41,7 @@ * Tests for {@link TabGroupUiViewBinder}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class TabGroupUiViewBinderTest extends DummyUiActivityTestCase { +public class TabGroupUiViewBinderTest extends BlankUiTestActivityTestCase { private ImageView mLeftButton; private ImageView mRightButton; private ViewGroup mContainerView; diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListContainerViewBinderTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListContainerViewBinderTest.java index c57e673c81c212..c2e208c03a83b3 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListContainerViewBinderTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListContainerViewBinderTest.java @@ -42,17 +42,17 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivity; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivity; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * Tests for {@link TabListRecyclerView} and {@link TabListContainerViewBinder} */ @RunWith(ChromeJUnit4ClassRunner.class) @Features.EnableFeatures({ChromeFeatureList.TAB_GRID_LAYOUT_ANDROID}) -public class TabListContainerViewBinderTest extends DummyUiActivityTestCase { +public class TabListContainerViewBinderTest extends BlankUiTestActivityTestCase { /** - * DummyUiActivityTestCase also needs {@link ChromeFeatureList}'s + * BlankUiTestActivityTestCase also needs {@link ChromeFeatureList}'s * internal test-only feature map, not the {@link CommandLine} provided by * {@link Features.InstrumentationProcessor}. */ @@ -97,7 +97,7 @@ public void finishedHiding() { @BeforeClass public static void setUpBeforeActivityLaunched() { - DummyUiActivity.setTestLayout(R.layout.tab_list_recycler_view_layout); + BlankUiTestActivity.setTestLayout(R.layout.tab_list_recycler_view_layout); } @Override diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListViewHolderTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListViewHolderTest.java index 14b47da996ba81..c257dbdd324683 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListViewHolderTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabListViewHolderTest.java @@ -79,7 +79,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.widget.ButtonCompat; import org.chromium.ui.widget.ChromeImageView; import org.chromium.url.GURL; @@ -96,7 +96,7 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, "enable-features=" + ChromeFeatureList.COMMERCE_PRICE_TRACKING + " - diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkShoppingItemRowRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkShoppingItemRowRenderTest.java index b743c192c8d0df..e9733e1b9ecc11 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkShoppingItemRowRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkShoppingItemRowRenderTest.java @@ -42,7 +42,7 @@ import org.chromium.components.image_fetcher.ImageFetcher; import org.chromium.components.payments.CurrencyFormatter; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import org.chromium.ui.test.util.NightModeTestUtils.NightModeParams; @@ -54,7 +54,7 @@ */ @RunWith(ParameterizedRunner.class) @ParameterAnnotations.UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class) -public class PowerBookmarkShoppingItemRowRenderTest extends DummyUiActivityTestCase { +public class PowerBookmarkShoppingItemRowRenderTest extends BlankUiTestActivityTestCase { @ParameterAnnotations.ClassParameter private static List sClassParams = new NightModeParams().getParameters(); @@ -84,7 +84,7 @@ public class PowerBookmarkShoppingItemRowRenderTest extends DummyUiActivityTestC public PowerBookmarkShoppingItemRowRenderTest(boolean nightModeEnabled) { // Sets a fake background color to make the screenshots easier to compare with bare eyes. - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkShoppingItemRowTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkShoppingItemRowTest.java index e7beacc9e6eff6..c06d7a9c815935 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkShoppingItemRowTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkShoppingItemRowTest.java @@ -37,13 +37,13 @@ import org.chromium.components.image_fetcher.ImageFetcher; import org.chromium.components.payments.CurrencyFormatter; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * Tests for the Shopping power bookmarks experience. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class PowerBookmarkShoppingItemRowTest extends DummyUiActivityTestCase { +public class PowerBookmarkShoppingItemRowTest extends BlankUiTestActivityTestCase { private static final long CURRENCY_MUTLIPLIER = 1000000; @Rule diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkTagChipListTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkTagChipListTest.java index 6981bd2519011f..ba4850372c6cc2 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkTagChipListTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkTagChipListTest.java @@ -30,7 +30,7 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.io.IOException; @@ -38,7 +38,7 @@ * Tests for the power bookmark experience. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class PowerBookmarkTagChipListTest extends DummyUiActivityTestCase { +public class PowerBookmarkTagChipListTest extends BlankUiTestActivityTestCase { @Rule public ChromeRenderTestRule mRenderTestRule = ChromeRenderTestRule.Builder.withPublicCorpus().build(); diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBaseTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBaseTest.java index 45aae571348442..dd4961dd2146a6 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBaseTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBaseTest.java @@ -37,8 +37,8 @@ import org.chromium.ui.base.ActivityWindowAndroid; import org.chromium.ui.base.IntentRequestTracker; import org.chromium.ui.base.WindowAndroid; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; /** * Tests logic in the OverlayPanelBase. @@ -58,8 +58,8 @@ public class OverlayPanelBaseTest { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Rule public MockitoRule mMockitoRule = MockitoJUnit.rule(); diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelEventFilterTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelEventFilterTest.java index f3e250dd956555..d2d3fa4312bd4f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelEventFilterTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelEventFilterTest.java @@ -38,8 +38,8 @@ import org.chromium.ui.base.ActivityWindowAndroid; import org.chromium.ui.base.IntentRequestTracker; import org.chromium.ui.base.WindowAndroid; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; /** * Class responsible for testing the OverlayPanelEventFilter. */ @@ -60,8 +60,8 @@ public class OverlayPanelEventFilterTest { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Rule public MockitoRule mMockitoRule = MockitoJUnit.rule(); diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelManagerTest.java index 0fd85d0b1c8a83..aac5ba6c3bcd06 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelManagerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelManagerTest.java @@ -41,8 +41,8 @@ import org.chromium.ui.base.IntentRequestTracker; import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.resources.dynamics.DynamicResourceLoader; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; import java.util.concurrent.TimeoutException; @@ -57,8 +57,8 @@ public class OverlayPanelManagerTest { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Rule public MockitoRule mMockitoRule = MockitoJUnit.rule(); diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuChipControllerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuChipControllerTest.java index d0a991ae4564cd..7ec62c3a34dc95 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuChipControllerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuChipControllerTest.java @@ -26,14 +26,14 @@ import org.chromium.chrome.R; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivity; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivity; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * Tests for ContextMenuHeader view and {@link ContextMenuHeaderViewBinder} */ @RunWith(ChromeJUnit4ClassRunner.class) -public class ContextMenuChipControllerTest extends DummyUiActivityTestCase { +public class ContextMenuChipControllerTest extends BlankUiTestActivityTestCase { // This is the combination of the expected vertical margins and the chip height. private static final int EXPECTED_VERTICAL_DP = 80; // Computed by taking the 338dp max width and subtracting: @@ -61,7 +61,7 @@ public class ContextMenuChipControllerTest extends DummyUiActivityTestCase { @BeforeClass public static void setUpBeforeActivityLaunched() { - DummyUiActivity.setTestLayout(R.layout.context_menu_fullscreen_container); + BlankUiTestActivity.setTestLayout(R.layout.context_menu_fullscreen_container); } @Override diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuHeaderViewTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuHeaderViewTest.java index fce1b5383a2c95..2c568414309430 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuHeaderViewTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuHeaderViewTest.java @@ -29,14 +29,14 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivity; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivity; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * Tests for ContextMenuHeader view and {@link ContextMenuHeaderViewBinder} */ @RunWith(ChromeJUnit4ClassRunner.class) -public class ContextMenuHeaderViewTest extends DummyUiActivityTestCase { +public class ContextMenuHeaderViewTest extends BlankUiTestActivityTestCase { private static final String TITLE_STRING = "Some Very Cool Title"; private static final String URL_STRING = "www.website.com"; @@ -53,7 +53,7 @@ public class ContextMenuHeaderViewTest extends DummyUiActivityTestCase { @BeforeClass public static void setUpBeforeActivityLaunched() { - DummyUiActivity.setTestLayout(R.layout.context_menu_header); + BlankUiTestActivity.setTestLayout(R.layout.context_menu_header); } @Override diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemViewTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemViewTest.java index b8f87dfa621b12..2177bae2104428 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemViewTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemViewTest.java @@ -27,15 +27,15 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivity; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivity; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * Tests for ContextMenu item view, {@link ContextMenuItemViewBinder}, and {@link * ContextMenuItemWithIconButtonViewBinder}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class ContextMenuItemViewTest extends DummyUiActivityTestCase { +public class ContextMenuItemViewTest extends BlankUiTestActivityTestCase { private static final String TEXT = "Useful menu item"; private static final String APP = "Some app"; @@ -49,7 +49,7 @@ public class ContextMenuItemViewTest extends DummyUiActivityTestCase { @BeforeClass public static void setUpBeforeActivityLaunched() { - DummyUiActivity.setTestLayout(org.chromium.chrome.R.layout.context_menu_share_row); + BlankUiTestActivity.setTestLayout(org.chromium.chrome.R.layout.context_menu_share_row); } @Override diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuRenderTest.java index 3e3082156ed15f..c7e07d1f7b8d7d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextmenu/ContextMenuRenderTest.java @@ -34,7 +34,7 @@ import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.ModelListAdapter; import org.chromium.ui.modelutil.PropertyModel; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import java.io.IOException; @@ -45,7 +45,7 @@ */ @RunWith(ParameterizedRunner.class) @ParameterAnnotations.UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class) -public class ContextMenuRenderTest extends DummyUiActivityTestCase { +public class ContextMenuRenderTest extends BlankUiTestActivityTestCase { @ParameterAnnotations.ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -62,7 +62,7 @@ public class ContextMenuRenderTest extends DummyUiActivityTestCase { private FeatureList.TestValues mTestValues; public ContextMenuRenderTest(boolean nightModeEnabled) { - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } @@ -110,7 +110,7 @@ public void setUpTest() throws Exception { @Override public void tearDownTest() throws Exception { TestThreadUtils.runOnUiThreadBlocking(() -> { - NightModeTestUtils.tearDownNightModeForDummyUiActivity(); + NightModeTestUtils.tearDownNightModeForBlankUiTestActivity(); mListItems.clear(); }); FeatureList.setTestValues(null); diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogTest.java index 74b6f9b19468d3..adc55635ec7e90 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogTest.java @@ -51,7 +51,7 @@ import org.chromium.components.user_prefs.UserPrefsJni; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modaldialog.ModalDialogManager; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.util.ArrayList; import java.util.HashMap; @@ -62,7 +62,7 @@ */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) -public class DownloadLocationDialogTest extends DummyUiActivityTestCase { +public class DownloadLocationDialogTest extends BlankUiTestActivityTestCase { private static final long TOTAL_BYTES = 1024L; private static final String SUGGESTED_PATH = "download.png"; private static final String PRIMARY_STORAGE_PATH = "/sdcard"; diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/init/FirstDrawDetectorTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/init/FirstDrawDetectorTest.java index 51c70bbf9fd357..9466cfd934da85 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/init/FirstDrawDetectorTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/init/FirstDrawDetectorTest.java @@ -16,7 +16,7 @@ import org.chromium.base.test.BaseActivityTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import java.util.concurrent.CountDownLatch; @@ -24,8 +24,8 @@ @RunWith(ChromeJUnit4ClassRunner.class) public class FirstDrawDetectorTest { @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Test @SmallTest @@ -33,7 +33,7 @@ public void testFirstDraw() throws Exception { mActivityTestRule.launchActivity(null); final CountDownLatch firstDrawEvent = new CountDownLatch(1); TestThreadUtils.runOnUiThreadBlocking(() -> { - DummyUiActivity activity = mActivityTestRule.getActivity(); + BlankUiTestActivity activity = mActivityTestRule.getActivity(); View view = new FrameLayout(activity); activity.setContentView(view); diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/MainIntentBehaviorMetricsIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/MainIntentBehaviorMetricsIntegrationTest.java index 296982ce71733e..47d5b1d3196b54 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/MainIntentBehaviorMetricsIntegrationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/metrics/MainIntentBehaviorMetricsIntegrationTest.java @@ -35,7 +35,7 @@ import org.chromium.chrome.browser.history.HistoryActivity; import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; import org.chromium.chrome.browser.preferences.SharedPreferencesManager; -import org.chromium.chrome.browser.settings.DummySettingsForTest; +import org.chromium.chrome.browser.settings.PlaceholderSettingsForTest; import org.chromium.chrome.browser.settings.SettingsActivity; import org.chromium.chrome.browser.settings.SettingsActivityTestRule; import org.chromium.chrome.test.ChromeActivityTestRule; @@ -57,8 +57,8 @@ public class MainIntentBehaviorMetricsIntegrationTest { @Rule public ChromeTabbedActivityTestRule mActivityTestRule = new ChromeTabbedActivityTestRule(); @Rule - public SettingsActivityTestRule mSettingsActivityTestRule = - new SettingsActivityTestRule<>(DummySettingsForTest.class); + public SettingsActivityTestRule mSettingsActivityTestRule = + new SettingsActivityTestRule<>(PlaceholderSettingsForTest.class); private UserActionTester mActionTester; diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/modaldialog/ModalDialogViewRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/modaldialog/ModalDialogViewRenderTest.java index 93e6e7e2bf8b17..59540cf52659ab 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/modaldialog/ModalDialogViewRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/modaldialog/ModalDialogViewRenderTest.java @@ -40,7 +40,7 @@ import org.chromium.ui.UiUtils; import org.chromium.ui.modaldialog.ModalDialogProperties; import org.chromium.ui.modelutil.PropertyModel; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import org.chromium.ui.test.util.RenderTestRule; @@ -54,7 +54,7 @@ @RunWith(ParameterizedRunner.class) @ParameterAnnotations.UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class) @Batch(Batch.PER_CLASS) -public class ModalDialogViewRenderTest extends DummyUiActivityTestCase { +public class ModalDialogViewRenderTest extends BlankUiTestActivityTestCase { @ParameterAnnotations.ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -76,13 +76,13 @@ public class ModalDialogViewRenderTest extends DummyUiActivityTestCase { public ModalDialogViewRenderTest(boolean nightModeEnabled) { // Sets a fake background color to make the screenshots easier to compare with bare eyes. mFakeBgColor = nightModeEnabled ? Color.BLACK : Color.WHITE; - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } @Override public void tearDownTest() throws Exception { - NightModeTestUtils.tearDownNightModeForDummyUiActivity(); + NightModeTestUtils.tearDownNightModeForBlankUiTestActivity(); super.tearDownTest(); } diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/IncognitoDescriptionViewRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/IncognitoDescriptionViewRenderTest.java index 6acc943c56c789..79fbef5c37100c 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/IncognitoDescriptionViewRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/IncognitoDescriptionViewRenderTest.java @@ -22,7 +22,7 @@ import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate; import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import java.io.IOException; @@ -33,7 +33,7 @@ */ @RunWith(ParameterizedRunner.class) @UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class) -public class IncognitoDescriptionViewRenderTest extends DummyUiActivityTestCase { +public class IncognitoDescriptionViewRenderTest extends BlankUiTestActivityTestCase { @ParameterAnnotations.ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -43,7 +43,7 @@ public class IncognitoDescriptionViewRenderTest extends DummyUiActivityTestCase ChromeRenderTestRule.Builder.withPublicCorpus().setRevision(1).build(); public IncognitoDescriptionViewRenderTest(boolean nightModeEnabled) { - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionViewRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionViewRenderTest.java index 086de3df3b2b5c..b33d40d8a8db8f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionViewRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionViewRenderTest.java @@ -21,7 +21,7 @@ import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate; import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import java.io.IOException; @@ -32,7 +32,7 @@ */ @RunWith(ParameterizedRunner.class) @UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class) -public class RevampedIncognitoDescriptionViewRenderTest extends DummyUiActivityTestCase { +public class RevampedIncognitoDescriptionViewRenderTest extends BlankUiTestActivityTestCase { @ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -42,7 +42,7 @@ public class RevampedIncognitoDescriptionViewRenderTest extends DummyUiActivityT ChromeRenderTestRule.Builder.withPublicCorpus().setRevision(1).build(); public RevampedIncognitoDescriptionViewRenderTest(boolean nightModeEnabled) { - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/status/StatusViewRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/status/StatusViewRenderTest.java index e434201f0d235b..0631b7f5f6245d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/status/StatusViewRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/status/StatusViewRenderTest.java @@ -43,7 +43,7 @@ import org.chromium.components.content_settings.ContentSettingsType; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.io.IOException; @@ -51,7 +51,7 @@ * Render tests for {@link StatusView}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class StatusViewRenderTest extends DummyUiActivityTestCase { +public class StatusViewRenderTest extends BlankUiTestActivityTestCase { @Rule public ChromeRenderTestRule mRenderTestRule = ChromeRenderTestRule.Builder.withPublicCorpus().build(); diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/status/StatusViewTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/status/StatusViewTest.java index 3d5f5b2133c898..72c2158bbb77a2 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/status/StatusViewTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/status/StatusViewTest.java @@ -41,14 +41,14 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.UiRestriction; /** * Tests for {@link StatusView} and {@link StatusViewBinder}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class StatusViewTest extends DummyUiActivityTestCase { +public class StatusViewTest extends BlankUiTestActivityTestCase { @Mock private SearchEngineLogoUtils mSearchEngineLogoUtils; diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/voice/AssistantVoiceSearchConsentUiRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/voice/AssistantVoiceSearchConsentUiRenderTest.java index 75d8ffe5f1ab52..f36d61feee7a80 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/voice/AssistantVoiceSearchConsentUiRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/voice/AssistantVoiceSearchConsentUiRenderTest.java @@ -21,14 +21,14 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.io.IOException; /** Render tests for AssistantVoiceSearchConsentDialog */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) -public class AssistantVoiceSearchConsentUiRenderTest extends DummyUiActivityTestCase { +public class AssistantVoiceSearchConsentUiRenderTest extends BlankUiTestActivityTestCase { @Rule public ChromeRenderTestRule mRenderTestRule = ChromeRenderTestRule.Builder.withPublicCorpus().build(); diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettingsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettingsTest.java index 1c285e88cba989..59970903851161 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettingsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettingsTest.java @@ -47,7 +47,7 @@ import org.chromium.chrome.browser.password_check.PasswordCheckFactory; import org.chromium.chrome.browser.preferences.Pref; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.settings.DummySettingsForTest; +import org.chromium.chrome.browser.settings.PlaceholderSettingsForTest; import org.chromium.chrome.browser.settings.SettingsActivity; import org.chromium.chrome.browser.settings.SettingsActivityTestRule; import org.chromium.chrome.browser.sync.SyncService; @@ -68,8 +68,9 @@ @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class PasswordSettingsTest { @Rule - public SettingsActivityTestRule mDummySettingsActivityTestRule = - new SettingsActivityTestRule<>(DummySettingsForTest.class); + public SettingsActivityTestRule + mPlaceholderSettingsActivityTestRule = + new SettingsActivityTestRule<>(PlaceholderSettingsForTest.class); @Rule public SettingsActivityTestRule mPasswordSettingsActivityTestRule = @@ -95,9 +96,9 @@ public void setUp() { // This initializes the browser, so some tests can do setup before PasswordSettings is // launched. ChromeTabbedActivityTestRule.startMainActivityOnBlankPage() is more commonly // used for this end, but using another settings activity instead makes these tests more - // isolated, i.e. avoids exercising unnecessary logic. DummyUiActivityTestCase also won't - // fit here, it doesn't initialize enough of the browser. - mDummySettingsActivityTestRule.startSettingsActivity(null); + // isolated, i.e. avoids exercising unnecessary logic. BlankUiTestActivityTestCase also + // won't fit here, it doesn't initialize enough of the browser. + mPlaceholderSettingsActivityTestRule.startSettingsActivity(null); } @After diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/AndroidPaymentAppFinderUnitTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/AndroidPaymentAppFinderUnitTest.java index 8f50249426bc3c..4f81d385044b07 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/AndroidPaymentAppFinderUnitTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/AndroidPaymentAppFinderUnitTest.java @@ -50,7 +50,7 @@ import org.chromium.ui.base.ActivityWindowAndroid; import org.chromium.ui.base.IntentRequestTracker; import org.chromium.ui.base.WindowAndroid; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.url.GURL; import org.chromium.url.Origin; @@ -62,7 +62,7 @@ /** Tests for the native Android payment app finder. */ @RunWith(BaseJUnit4ClassRunner.class) @Batch(AndroidPaymentAppFinderUnitTest.PAYMENTS_BROWSER_UNIT_TESTS) -public class AndroidPaymentAppFinderUnitTest extends DummyUiActivityTestCase { +public class AndroidPaymentAppFinderUnitTest extends BlankUiTestActivityTestCase { // Collection of payments unit tests that require the browser process to be initialized. static final String PAYMENTS_BROWSER_UNIT_TESTS = "PaymentsBrowserUnitTests"; private static final IntentArgumentMatcher sPayIntentArgumentMatcher = diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SyncConsentFragmentTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SyncConsentFragmentTest.java index dd7ea9d1c16906..51afc2dc64c832 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SyncConsentFragmentTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SyncConsentFragmentTest.java @@ -72,8 +72,8 @@ import org.chromium.components.signin.identitymanager.ConsentLevel; import org.chromium.components.signin.metrics.SigninAccessPoint; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; import java.io.IOException; import java.util.List; @@ -127,8 +127,8 @@ protected void updateAccounts(List accounts) { new ChromeTabbedActivityTestRule(); @Rule - public final BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public final BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Rule public final ChromeRenderTestRule mRenderTestRule = diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorViewBinderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorViewBinderTest.java index 69f51a70849d14..75cf2966fb4c56 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorViewBinderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorViewBinderTest.java @@ -35,14 +35,14 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivity; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivity; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * Tests for {@link StatusIndicatorViewBinder}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class StatusIndicatorViewBinderTest extends DummyUiActivityTestCase { +public class StatusIndicatorViewBinderTest extends BlankUiTestActivityTestCase { private static final String STATUS_TEXT = "Offline"; private ViewResourceFrameLayout mContainer; @@ -54,7 +54,7 @@ public class StatusIndicatorViewBinderTest extends DummyUiActivityTestCase { @BeforeClass public static void setUpBeforeActivityLaunched() { - DummyUiActivity.setTestLayout(R.layout.status_indicator_container); + BlankUiTestActivity.setTestLayout(R.layout.status_indicator_container); } @Override diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/suggestions/tile/TileRendererTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/suggestions/tile/TileRendererTest.java index a95cc675fdd3c4..101ddb61ad86fc 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/suggestions/tile/TileRendererTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/suggestions/tile/TileRendererTest.java @@ -25,7 +25,7 @@ import org.chromium.chrome.browser.suggestions.SiteSuggestion; import org.chromium.chrome.browser.suggestions.SuggestionsConfig.TileStyle; import org.chromium.chrome.test.util.browser.Features; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.url.GURL; /** A simple test for {@link TileRenderer} using real {@link android.view.View} objects. */ @@ -37,8 +37,8 @@ public class TileRendererTest { @Rule public TestRule mFeaturesProcessor = new Features.JUnitProcessor(); @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Mock private ImageFetcher mMockImageFetcher; diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/sync/ui/PassphraseTypeDialogFragmentTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/sync/ui/PassphraseTypeDialogFragmentTest.java index e2802d4d80f47c..fa51db9dfd7e09 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/sync/ui/PassphraseTypeDialogFragmentTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/sync/ui/PassphraseTypeDialogFragmentTest.java @@ -31,7 +31,7 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.util.ActivityTestUtils; import org.chromium.components.sync.PassphraseType; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.RenderTestRule; import java.io.IOException; @@ -41,7 +41,7 @@ */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) -public class PassphraseTypeDialogFragmentTest extends DummyUiActivityTestCase { +public class PassphraseTypeDialogFragmentTest extends BlankUiTestActivityTestCase { @Rule public RenderTestRule mRenderTestRule = RenderTestRule.Builder.withPublicCorpus().setRevision(1).build(); diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/HomeButtonTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/HomeButtonTest.java index a429c0c15fdd91..be2880cbcfffe9 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/HomeButtonTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/HomeButtonTest.java @@ -35,14 +35,14 @@ import org.chromium.chrome.test.util.browser.Features; import org.chromium.components.browser_ui.settings.SettingsLauncher; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * Test related to {@link HomeButton}. * TODO: Add more test when features related has update. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class HomeButtonTest extends DummyUiActivityTestCase { +public class HomeButtonTest extends BlankUiTestActivityTestCase { private static final String ASSERT_MSG_MENU_IS_CREATED = "ContextMenu is not created after long press."; private static final String ASSERT_MSG_MENU_SIZE = diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuRenderTest.java index 191d3d28d4eee5..9d70357fce704e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuRenderTest.java @@ -35,8 +35,8 @@ import org.chromium.chrome.test.util.browser.Features.EnableFeatures; import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; import org.chromium.ui.test.util.NightModeTestUtils; import java.io.IOException; @@ -58,8 +58,8 @@ public class AdaptiveButtonActionMenuRenderTest { public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Rule public ChromeRenderTestRule mRenderTestRule = @@ -68,7 +68,7 @@ public class AdaptiveButtonActionMenuRenderTest { private View mView; public AdaptiveButtonActionMenuRenderTest(boolean nightModeEnabled) { - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } @@ -97,7 +97,7 @@ public void setUpTest() throws Exception { @After public void tearDownTest() throws Exception { TestThreadUtils.runOnUiThreadBlocking( - () -> NightModeTestUtils.tearDownNightModeForDummyUiActivity()); + () -> NightModeTestUtils.tearDownNightModeForBlankUiTestActivity()); } @Test diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuRenderTest.java index 54c4dfc7dc0ce2..c07ba630a0c515 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuRenderTest.java @@ -28,7 +28,7 @@ import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import java.io.IOException; @@ -39,7 +39,7 @@ */ @RunWith(ParameterizedRunner.class) @ParameterAnnotations.UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class) -public class TabSwitcherActionMenuRenderTest extends DummyUiActivityTestCase { +public class TabSwitcherActionMenuRenderTest extends BlankUiTestActivityTestCase { @ParameterAnnotations.ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -51,13 +51,13 @@ public class TabSwitcherActionMenuRenderTest extends DummyUiActivityTestCase { private View mView; public TabSwitcherActionMenuRenderTest(boolean nightModeEnabled) { - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } @Override public void tearDownTest() throws Exception { - NightModeTestUtils.tearDownNightModeForDummyUiActivity(); + NightModeTestUtils.tearDownNightModeForBlankUiTestActivity(); super.tearDownTest(); } diff --git a/chrome/browser/attribution_reporting/android/internal/java/src/org/chromium/chrome/browser/attribution_reporting/InputEventValidatorManualTest.java b/chrome/browser/attribution_reporting/android/internal/java/src/org/chromium/chrome/browser/attribution_reporting/InputEventValidatorManualTest.java index 4559fdff3b5788..63004e3236a384 100644 --- a/chrome/browser/attribution_reporting/android/internal/java/src/org/chromium/chrome/browser/attribution_reporting/InputEventValidatorManualTest.java +++ b/chrome/browser/attribution_reporting/android/internal/java/src/org/chromium/chrome/browser/attribution_reporting/InputEventValidatorManualTest.java @@ -17,7 +17,7 @@ import org.chromium.base.ThreadUtils; import org.chromium.base.test.util.Manual; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; @@ -32,7 +32,7 @@ * These tests only work on R+. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class InputEventValidatorManualTest extends DummyUiActivityTestCase { +public class InputEventValidatorManualTest extends BlankUiTestActivityTestCase { private String mPackageName = "com.android.packageName"; private byte mPackageMac[]; diff --git a/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinderTest.java b/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinderTest.java index 074594c2a9242c..63fea73fa3cd11 100644 --- a/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinderTest.java +++ b/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinderTest.java @@ -28,7 +28,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.url.GURL; import java.util.concurrent.atomic.AtomicBoolean; @@ -37,7 +37,7 @@ * Tests for {@link BottomSheetToolbarViewBinder}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class BottomSheetToolbarViewBinderTest extends DummyUiActivityTestCase { +public class BottomSheetToolbarViewBinderTest extends BlankUiTestActivityTestCase { private final AtomicBoolean mIconClicked = new AtomicBoolean(); private BottomSheetToolbarView mItemView; diff --git a/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMessageViewTest.java b/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMessageViewTest.java index efdc216a6498dd..f2433514c2a141 100644 --- a/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMessageViewTest.java +++ b/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMessageViewTest.java @@ -34,7 +34,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import java.io.IOException; @@ -45,7 +45,7 @@ */ @RunWith(ParameterizedRunner.class) @ParameterAnnotations.UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class) -public class MerchantTrustMessageViewTest extends DummyUiActivityTestCase { +public class MerchantTrustMessageViewTest extends BlankUiTestActivityTestCase { @ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -58,7 +58,7 @@ public class MerchantTrustMessageViewTest extends DummyUiActivityTestCase { ChromeRenderTestRule.Builder.withPublicCorpus().build(); public MerchantTrustMessageViewTest(boolean nightModeEnabled) { - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } @@ -81,7 +81,7 @@ public void setUpTest() throws Exception { @Override public void tearDownTest() throws Exception { - NightModeTestUtils.tearDownNightModeForDummyUiActivity(); + NightModeTestUtils.tearDownNightModeForBlankUiTestActivity(); super.tearDownTest(); } diff --git a/chrome/browser/continuous_search/android/javatests/org/chromium/chrome/browser/continuous_search/ContinuousSearchChipViewTest.java b/chrome/browser/continuous_search/android/javatests/org/chromium/chrome/browser/continuous_search/ContinuousSearchChipViewTest.java index 4977c78e72ecc7..0f8901b2f58108 100644 --- a/chrome/browser/continuous_search/android/javatests/org/chromium/chrome/browser/continuous_search/ContinuousSearchChipViewTest.java +++ b/chrome/browser/continuous_search/android/javatests/org/chromium/chrome/browser/continuous_search/ContinuousSearchChipViewTest.java @@ -21,7 +21,7 @@ import org.chromium.base.test.util.Batch; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; /** * Tests for {@link ContinuousSearchChipView}. @@ -30,8 +30,8 @@ @Batch(Batch.UNIT_TESTS) public class ContinuousSearchChipViewTest { @ClassRule - public static BaseActivityTestRule sActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule sActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private static Activity sActivity; private ContinuousSearchChipView mChipView; diff --git a/chrome/browser/continuous_search/android/javatests/org/chromium/chrome/browser/continuous_search/ContinuousSearchUiTest.java b/chrome/browser/continuous_search/android/javatests/org/chromium/chrome/browser/continuous_search/ContinuousSearchUiTest.java index e94b61f293cafd..787c4a92c38542 100644 --- a/chrome/browser/continuous_search/android/javatests/org/chromium/chrome/browser/continuous_search/ContinuousSearchUiTest.java +++ b/chrome/browser/continuous_search/android/javatests/org/chromium/chrome/browser/continuous_search/ContinuousSearchUiTest.java @@ -46,7 +46,7 @@ import org.chromium.components.url_formatter.UrlFormatter; import org.chromium.components.url_formatter.UrlFormatterJni; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.url.GURL; import org.chromium.url.JUnitTestGURLs; @@ -61,8 +61,8 @@ @Batch(Batch.UNIT_TESTS) public class ContinuousSearchUiTest { @ClassRule - public static BaseActivityTestRule sActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule sActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private static Activity sActivity; diff --git a/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/DownloadActivityV2Test.java b/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/DownloadActivityV2Test.java index 6c5b67cec3ddb0..ecc0d5c505cd55 100644 --- a/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/DownloadActivityV2Test.java +++ b/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/DownloadActivityV2Test.java @@ -77,7 +77,7 @@ import org.chromium.content_public.browser.UiThreadTaskTraits; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modaldialog.ModalDialogManager; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.UiRestriction; import org.chromium.url.JUnitTestGURLs; @@ -88,7 +88,7 @@ /** Tests the DownloadActivity home V2. */ @RunWith(ChromeJUnit4ClassRunner.class) @Restriction(UiRestriction.RESTRICTION_TYPE_PHONE) -public class DownloadActivityV2Test extends DummyUiActivityTestCase { +public class DownloadActivityV2Test extends BlankUiTestActivityTestCase { @Mock private Tracker mTracker; @Mock diff --git a/chrome/browser/image_descriptions/android/java/src/org/chromium/chrome/browser/image_descriptions/ImageDescriptionsControllerTest.java b/chrome/browser/image_descriptions/android/java/src/org/chromium/chrome/browser/image_descriptions/ImageDescriptionsControllerTest.java index 99a00a68edf45f..0b0e864ef3cae5 100644 --- a/chrome/browser/image_descriptions/android/java/src/org/chromium/chrome/browser/image_descriptions/ImageDescriptionsControllerTest.java +++ b/chrome/browser/image_descriptions/android/java/src/org/chromium/chrome/browser/image_descriptions/ImageDescriptionsControllerTest.java @@ -49,14 +49,14 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.net.ConnectionType; import org.chromium.ui.modaldialog.ModalDialogManager; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * Unit tests for {@link ImageDescriptionsController} */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) -public class ImageDescriptionsControllerTest extends DummyUiActivityTestCase { +public class ImageDescriptionsControllerTest extends BlankUiTestActivityTestCase { @Rule public JniMocker mJniMocker = new JniMocker(); diff --git a/chrome/browser/image_descriptions/android/java/src/org/chromium/chrome/browser/image_descriptions/ImageDescriptionsDialogTest.java b/chrome/browser/image_descriptions/android/java/src/org/chromium/chrome/browser/image_descriptions/ImageDescriptionsDialogTest.java index 83c5871a8254e7..55e5607d4203d9 100644 --- a/chrome/browser/image_descriptions/android/java/src/org/chromium/chrome/browser/image_descriptions/ImageDescriptionsDialogTest.java +++ b/chrome/browser/image_descriptions/android/java/src/org/chromium/chrome/browser/image_descriptions/ImageDescriptionsDialogTest.java @@ -54,14 +54,14 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.net.ConnectionType; import org.chromium.ui.modaldialog.ModalDialogManager; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * Unit tests for {@link ImageDescriptionsDialog} */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) -public class ImageDescriptionsDialogTest extends DummyUiActivityTestCase { +public class ImageDescriptionsDialogTest extends BlankUiTestActivityTestCase { @Rule public JniMocker mJniMocker = new JniMocker(); diff --git a/chrome/browser/incognito/android/javatests/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthSettingSwitchPreferenceTest.java b/chrome/browser/incognito/android/javatests/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthSettingSwitchPreferenceTest.java index 42d6e577ad8e64..6d23ae66a039cf 100644 --- a/chrome/browser/incognito/android/javatests/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthSettingSwitchPreferenceTest.java +++ b/chrome/browser/incognito/android/javatests/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthSettingSwitchPreferenceTest.java @@ -25,7 +25,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.chromium.chrome.browser.settings.DummySettingsForTest; +import org.chromium.chrome.browser.settings.PlaceholderSettingsForTest; import org.chromium.chrome.browser.settings.SettingsActivityTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; @@ -38,8 +38,8 @@ public class IncognitoReauthSettingSwitchPreferenceTest { private static final String SUMMARY = "This is a summary."; @Rule - public SettingsActivityTestRule mSettingsActivityTestRule = - new SettingsActivityTestRule<>(DummySettingsForTest.class); + public SettingsActivityTestRule mSettingsActivityTestRule = + new SettingsActivityTestRule<>(PlaceholderSettingsForTest.class); private IncognitoReauthSettingSwitchPreference mPreference; private Context mContext; diff --git a/chrome/browser/incognito/android/javatests/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthViewTest.java b/chrome/browser/incognito/android/javatests/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthViewTest.java index 85efe5e6803685..020e7116a67615 100644 --- a/chrome/browser/incognito/android/javatests/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthViewTest.java +++ b/chrome/browser/incognito/android/javatests/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthViewTest.java @@ -27,7 +27,7 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.io.IOException; @@ -36,7 +36,7 @@ */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) -public class IncognitoReauthViewTest extends DummyUiActivityTestCase { +public class IncognitoReauthViewTest extends BlankUiTestActivityTestCase { private View mView; @Rule diff --git a/chrome/browser/password_edit_dialog/android/java/src/org/chromium/chrome/browser/password_edit_dialog/PasswordEditDialogViewTest.java b/chrome/browser/password_edit_dialog/android/java/src/org/chromium/chrome/browser/password_edit_dialog/PasswordEditDialogViewTest.java index 3d8152b2bbd2c1..738bb2e4d4e3b5 100644 --- a/chrome/browser/password_edit_dialog/android/java/src/org/chromium/chrome/browser/password_edit_dialog/PasswordEditDialogViewTest.java +++ b/chrome/browser/password_edit_dialog/android/java/src/org/chromium/chrome/browser/password_edit_dialog/PasswordEditDialogViewTest.java @@ -24,7 +24,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import java.util.Arrays; @@ -38,8 +38,8 @@ public class PasswordEditDialogViewTest { private static final String FOOTER = "Footer"; @ClassRule - public static BaseActivityTestRule sActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule sActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private static Activity sActivity; diff --git a/chrome/browser/settings/BUILD.gn b/chrome/browser/settings/BUILD.gn index e4f64100873b27..d2b04b8b9cc3e4 100644 --- a/chrome/browser/settings/BUILD.gn +++ b/chrome/browser/settings/BUILD.gn @@ -22,8 +22,8 @@ android_library("javatests") { sources = [ "android/java/src/org/chromium/chrome/browser/settings/ChromeBasePreferenceTest.java", "android/java/src/org/chromium/chrome/browser/settings/ChromeImageViewPreferenceTest.java", - "android/java/src/org/chromium/chrome/browser/settings/DummySettingsForTest.java", "android/java/src/org/chromium/chrome/browser/settings/ManagedPreferencesUtilsTest.java", + "android/java/src/org/chromium/chrome/browser/settings/PlaceholderSettingsForTest.java", ] deps = [ diff --git a/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ChromeBasePreferenceTest.java b/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ChromeBasePreferenceTest.java index e9af1be28eb57e..df2c257c92f007 100644 --- a/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ChromeBasePreferenceTest.java +++ b/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ChromeBasePreferenceTest.java @@ -43,8 +43,8 @@ @RunWith(ChromeJUnit4ClassRunner.class) public class ChromeBasePreferenceTest { @Rule - public SettingsActivityTestRule mActivityRule = - new SettingsActivityTestRule<>(DummySettingsForTest.class); + public SettingsActivityTestRule mActivityRule = + new SettingsActivityTestRule<>(PlaceholderSettingsForTest.class); private PreferenceScreen mPreferenceScreen; private Context mContext; diff --git a/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ChromeImageViewPreferenceTest.java b/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ChromeImageViewPreferenceTest.java index 3149772aad7448..d0aa751f52e63b 100644 --- a/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ChromeImageViewPreferenceTest.java +++ b/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ChromeImageViewPreferenceTest.java @@ -57,7 +57,7 @@ public void setUp() { SettingsLauncher settingsLauncher = new SettingsLauncherImpl(); Intent intent = settingsLauncher.createSettingsActivityIntent( InstrumentationRegistry.getInstrumentation().getContext(), - DummySettingsForTest.class.getName()); + PlaceholderSettingsForTest.class.getName()); mRule.launchActivity(intent); PreferenceFragmentCompat fragment = diff --git a/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ManagedPreferencesUtilsTest.java b/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ManagedPreferencesUtilsTest.java index 9293dea340bf71..979a7dd52ec841 100644 --- a/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ManagedPreferencesUtilsTest.java +++ b/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/ManagedPreferencesUtilsTest.java @@ -124,7 +124,7 @@ public void setUp() { SettingsLauncher settingsLauncher = new SettingsLauncherImpl(); Intent intent = settingsLauncher.createSettingsActivityIntent( InstrumentationRegistry.getInstrumentation().getContext(), - DummySettingsForTest.class.getName()); + PlaceholderSettingsForTest.class.getName()); mRule.launchActivity(intent); PreferenceFragmentCompat fragment = diff --git a/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/DummySettingsForTest.java b/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/PlaceholderSettingsForTest.java similarity index 76% rename from chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/DummySettingsForTest.java rename to chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/PlaceholderSettingsForTest.java index 59bd03f6e95757..e535a6d95bb025 100644 --- a/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/DummySettingsForTest.java +++ b/chrome/browser/settings/android/java/src/org/chromium/chrome/browser/settings/PlaceholderSettingsForTest.java @@ -11,12 +11,12 @@ import androidx.preference.PreferenceScreen; /** - * A dummy {@link PreferenceFragmentCompat} for use in tests. + * A placeholder {@link PreferenceFragmentCompat} for use in tests. */ -public class DummySettingsForTest extends PreferenceFragmentCompat { +public class PlaceholderSettingsForTest extends PreferenceFragmentCompat { @Override public void onCreatePreferences(Bundle bundle, String rootKey) { - getActivity().setTitle("Dummy Settings"); + getActivity().setTitle("Placeholder Settings"); Context context = getPreferenceManager().getContext(); PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(context); diff --git a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/SaveBitmapDelegateTest.java b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/SaveBitmapDelegateTest.java index 0e37b954e3352d..4361d724d81722 100644 --- a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/SaveBitmapDelegateTest.java +++ b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/SaveBitmapDelegateTest.java @@ -24,7 +24,7 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.ui.permissions.AndroidPermissionDelegate; import org.chromium.ui.permissions.PermissionCallback; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; /** * Tests for the {@link SaveBitmapDelegate}. @@ -34,8 +34,8 @@ public class SaveBitmapDelegateTest { private SaveBitmapDelegate mSaveBitmapDelegate; @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Mock private Runnable mCloseDialogRunnable; diff --git a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/long_screenshots/LongScreenshotsMediatorTest.java b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/long_screenshots/LongScreenshotsMediatorTest.java index 1551470ce0a041..bc189d13cb982d 100644 --- a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/long_screenshots/LongScreenshotsMediatorTest.java +++ b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/long_screenshots/LongScreenshotsMediatorTest.java @@ -26,7 +26,7 @@ import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.share.long_screenshots.bitmap_generation.EntryManager; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; /** Tests for the LongScreenshotsMediator. */ @RunWith(ChromeJUnit4ClassRunner.class) @@ -38,8 +38,8 @@ public class LongScreenshotsMediatorTest { private LongScreenshotsMediator mMediator; @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Mock private View mView; diff --git a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetViewTest.java b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetViewTest.java index 2a1a2038c4878e..ca20e339245375 100644 --- a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetViewTest.java +++ b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetViewTest.java @@ -23,7 +23,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.util.concurrent.atomic.AtomicBoolean; @@ -31,7 +31,7 @@ * Tests for the {@link ScreenshotShareSheetView}. */ @RunWith(ChromeJUnit4ClassRunner.class) -public class ScreenshotShareSheetViewTest extends DummyUiActivityTestCase { +public class ScreenshotShareSheetViewTest extends BlankUiTestActivityTestCase { private ScreenshotShareSheetView mScreenshotView; private PropertyModel mScreenshotModel; private PropertyModelChangeProcessor mScreenshotMCP; diff --git a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProviderTest.java b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProviderTest.java index f9ff0627912f43..0b8c476a4b945a 100644 --- a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProviderTest.java +++ b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProviderTest.java @@ -59,7 +59,7 @@ import org.chromium.components.user_prefs.UserPrefsJni; import org.chromium.content_public.browser.WebContents; import org.chromium.ui.modelutil.PropertyModel; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.url.GURL; import java.util.ArrayList; @@ -74,8 +74,8 @@ public class ChromeProvidedSharingOptionsProviderTest { public final ChromeBrowserTestRule mBrowserTestRule = new ChromeBrowserTestRule(); @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Rule public TestRule mFeatureProcessor = new Features.JUnitProcessor(); diff --git a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetBottomSheetContentTest.java b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetBottomSheetContentTest.java index c6d604e6f4e861..92909c3cabdc9a 100644 --- a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetBottomSheetContentTest.java +++ b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetBottomSheetContentTest.java @@ -50,7 +50,7 @@ import org.chromium.components.feature_engagement.TriggerDetails; import org.chromium.components.url_formatter.UrlFormatter; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.url.GURL; import java.util.ArrayList; @@ -64,8 +64,8 @@ public final class ShareSheetBottomSheetContentTest { public final ChromeBrowserTestRule mBrowserTestRule = new ChromeBrowserTestRule(); @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Mock private ShareSheetLinkToggleCoordinator mShareSheetLinkToggleCoordinator; diff --git a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetPropertyModelBuilderTest.java b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetPropertyModelBuilderTest.java index 9929814dc43e76..17c6046de9e60c 100644 --- a/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetPropertyModelBuilderTest.java +++ b/chrome/browser/share/android/javatests/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetPropertyModelBuilderTest.java @@ -43,7 +43,7 @@ import org.chromium.chrome.test.util.browser.Features; import org.chromium.components.browser_ui.share.ShareParams; import org.chromium.ui.modelutil.PropertyModel; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import java.util.ArrayList; import java.util.List; @@ -58,8 +58,8 @@ public final class ShareSheetPropertyModelBuilderTest { public final ChromeBrowserTestRule mBrowserTestRule = new ChromeBrowserTestRule(); @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Rule public TestRule mFeatureProcessor = new Features.JUnitProcessor(); diff --git a/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/ProfileDataCacheRenderTest.java b/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/ProfileDataCacheRenderTest.java index 13772885d85c21..889dbb54f95c76 100644 --- a/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/ProfileDataCacheRenderTest.java +++ b/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/ProfileDataCacheRenderTest.java @@ -56,7 +56,7 @@ import org.chromium.components.signin.identitymanager.IdentityManager; import org.chromium.components.signin.identitymanager.IdentityManagerJni; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.widget.ChromeImageView; import java.io.IOException; @@ -69,7 +69,7 @@ @RunWith(ParameterizedRunner.class) @UseRunnerDelegate(ChromeJUnit4RunnerDelegate.class) @Batch(ProfileDataCacheRenderTest.PROFILE_DATA_BATCH_NAME) -public class ProfileDataCacheRenderTest extends DummyUiActivityTestCase { +public class ProfileDataCacheRenderTest extends BlankUiTestActivityTestCase { public static final String PROFILE_DATA_BATCH_NAME = "profile_data"; public static final String ACCOUNT_EMAIL = "test@gmail.com"; private static final long NATIVE_IDENTITY_MANAGER = 10002L; diff --git a/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/ProfileDataCacheWithBadgeRenderTest.java b/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/ProfileDataCacheWithBadgeRenderTest.java index ce7676c69ba799..73c9b3bb6de89c 100644 --- a/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/ProfileDataCacheWithBadgeRenderTest.java +++ b/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/ProfileDataCacheWithBadgeRenderTest.java @@ -26,7 +26,7 @@ import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.chrome.test.util.browser.signin.AccountManagerTestRule; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.widget.ChromeImageView; import java.io.IOException; @@ -37,7 +37,7 @@ */ @RunWith(ChromeJUnit4ClassRunner.class) @Batch(ProfileDataCacheRenderTest.PROFILE_DATA_BATCH_NAME) -public class ProfileDataCacheWithBadgeRenderTest extends DummyUiActivityTestCase { +public class ProfileDataCacheWithBadgeRenderTest extends BlankUiTestActivityTestCase { private static final String TEST_ACCOUNT_NAME = "test@example.com"; @Rule diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuItemViewBinderRenderTest.java b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuItemViewBinderRenderTest.java index 7e91af95c7e8d7..4d5e0aa09e8148 100644 --- a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuItemViewBinderRenderTest.java +++ b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuItemViewBinderRenderTest.java @@ -37,8 +37,8 @@ import org.chromium.ui.modelutil.LayoutViewBuilder; import org.chromium.ui.modelutil.ModelListAdapter; import org.chromium.ui.modelutil.PropertyModel; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; import org.chromium.ui.test.util.NightModeTestUtils; import java.io.IOException; @@ -61,8 +61,8 @@ public class AppMenuItemViewBinderRenderTest { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Rule public ChromeRenderTestRule mRenderTestRule = ChromeRenderTestRule.Builder.withPublicCorpus().build(); @@ -87,7 +87,7 @@ public class AppMenuItemViewBinderRenderTest { public AppMenuItemViewBinderRenderTest(boolean nightMode, boolean menuItemEnabled) { mMenuItemEnabled = menuItemEnabled; - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightMode); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightMode); mRenderTestRule.setNightModeEnabled(nightMode); mRenderTestRule.setVariantPrefix(menuItemEnabled ? "MenuItemEnabled" : "MenuItemDisabled"); } @@ -131,7 +131,7 @@ public void tearDownTest() throws Exception { @AfterClass public static void afterClass() { - NightModeTestUtils.tearDownNightModeForDummyUiActivity(); + NightModeTestUtils.tearDownNightModeForBlankUiTestActivity(); } private PropertyModel createStandardMenuItem( diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuItemViewBinderTest.java b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuItemViewBinderTest.java index 24637b67ccb989..953a9035df5d51 100644 --- a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuItemViewBinderTest.java +++ b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuItemViewBinderTest.java @@ -38,8 +38,8 @@ import org.chromium.ui.modelutil.ModelListAdapter; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; import org.chromium.ui.widget.ChromeImageView; import java.util.concurrent.ExecutionException; @@ -182,8 +182,8 @@ public int getPixelHeight(Context context) { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private static Activity sActivity; private static FrameLayout sParentView; diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuTest.java b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuTest.java index 1fd08dbaa512dd..13f85d0b936b54 100644 --- a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuTest.java +++ b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuTest.java @@ -41,8 +41,8 @@ import org.chromium.components.browser_ui.widget.chips.ChipView; import org.chromium.components.browser_ui.widget.highlight.ViewHighlighterTestUtils; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivity; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivity; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.UiDisableIf; import java.util.ArrayList; @@ -57,7 +57,7 @@ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) @Batch(Batch.PER_CLASS) -public class AppMenuTest extends DummyUiActivityTestCase { +public class AppMenuTest extends BlankUiTestActivityTestCase { private AppMenuCoordinatorImpl mAppMenuCoordinator; private AppMenuHandlerImpl mAppMenuHandler; private TestAppMenuPropertiesDelegate mPropertiesDelegate; @@ -74,7 +74,7 @@ public class AppMenuTest extends DummyUiActivityTestCase { @BeforeClass public static void setUpBeforeActivityLaunched() { - DummyUiActivity.setTestLayout(R.layout.test_app_menu_activity_layout); + BlankUiTestActivity.setTestLayout(R.layout.test_app_menu_activity_layout); } @Override diff --git a/chrome/browser/ui/android/logo/java/src/org/chromium/chrome/browser/logo/LogoViewTest.java b/chrome/browser/ui/android/logo/java/src/org/chromium/chrome/browser/logo/LogoViewTest.java index 010c0bfb6de44b..c997bbbfcc7309 100644 --- a/chrome/browser/ui/android/logo/java/src/org/chromium/chrome/browser/logo/LogoViewTest.java +++ b/chrome/browser/ui/android/logo/java/src/org/chromium/chrome/browser/logo/LogoViewTest.java @@ -32,12 +32,12 @@ import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory; import org.chromium.components.search_engines.TemplateUrlService; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** Instrumentation tests for {@link LogoView}. */ @RunWith(BaseJUnit4ClassRunner.class) @Batch(Batch.UNIT_TESTS) -public class LogoViewTest extends DummyUiActivityTestCase { +public class LogoViewTest extends BlankUiTestActivityTestCase { @Rule public MockitoRule mMockitoRule = MockitoJUnit.rule(); @Mock diff --git a/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherCoordinatorTest.java b/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherCoordinatorTest.java index 95b6b2e5c99c1b..19e460b735229e 100644 --- a/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherCoordinatorTest.java +++ b/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherCoordinatorTest.java @@ -37,10 +37,9 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.components.browser_ui.modaldialog.AppModalPresenter; import org.chromium.components.favicon.LargeIconBridge; -import org.chromium.components.favicon.LargeIconBridge.LargeIconCallback; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modaldialog.ModalDialogManager; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.url.GURL; import java.util.Arrays; @@ -50,7 +49,7 @@ */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) -public class InstanceSwitcherCoordinatorTest extends DummyUiActivityTestCase { +public class InstanceSwitcherCoordinatorTest extends BlankUiTestActivityTestCase { private LargeIconBridge mIconBridge; private ModalDialogManager mModalDialogManager; diff --git a/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/TargetSelectorCoordinatorTest.java b/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/TargetSelectorCoordinatorTest.java index 1c41fbfb230b93..b7de316aa4699f 100644 --- a/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/TargetSelectorCoordinatorTest.java +++ b/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/TargetSelectorCoordinatorTest.java @@ -24,10 +24,9 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.components.browser_ui.modaldialog.AppModalPresenter; import org.chromium.components.favicon.LargeIconBridge; -import org.chromium.components.favicon.LargeIconBridge.LargeIconCallback; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modaldialog.ModalDialogManager; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.url.GURL; import java.util.Arrays; @@ -37,7 +36,7 @@ */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) -public class TargetSelectorCoordinatorTest extends DummyUiActivityTestCase { +public class TargetSelectorCoordinatorTest extends BlankUiTestActivityTestCase { private LargeIconBridge mIconBridge; private ModalDialogManager mModalDialogManager; diff --git a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/settings/ThemeSettingsFragmentTest.java b/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/settings/ThemeSettingsFragmentTest.java index cdc014845f3178..f6ef5b4cf2e72c 100644 --- a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/settings/ThemeSettingsFragmentTest.java +++ b/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/settings/ThemeSettingsFragmentTest.java @@ -43,14 +43,14 @@ import org.chromium.components.browser_ui.widget.RadioButtonWithDescriptionLayout; import org.chromium.components.content_settings.ContentSettingsType; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * Tests for ThemeSettingsFragment. */ // clang-format off @RunWith(ChromeJUnit4ClassRunner.class) -public class ThemeSettingsFragmentTest extends DummyUiActivityTestCase { +public class ThemeSettingsFragmentTest extends BlankUiTestActivityTestCase { // clang-format on @Rule public SettingsActivityTestRule mSettingsActivityTestRule = diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/ConfirmImportSyncDataDialogTest.java b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/ConfirmImportSyncDataDialogTest.java index 7483178e6ea8cf..558160bde9380a 100644 --- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/ConfirmImportSyncDataDialogTest.java +++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/ConfirmImportSyncDataDialogTest.java @@ -53,8 +53,8 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; /** * Instrumentation tests for {@link ConfirmImportSyncDataDialogCoordinator}. @@ -94,8 +94,8 @@ public boolean matchesSafely(Root root) { new DisableAnimationsTestRule(); @ClassRule - public static final BaseActivityTestRule sActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static final BaseActivityTestRule sActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Mock private ConfirmImportSyncDataDialogCoordinator.Listener mListenerMock; diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/ConfirmManagedSyncDataDialogIntegrationTest.java b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/ConfirmManagedSyncDataDialogIntegrationTest.java index 9456edda62f6e0..7dc169cbcbe40b 100644 --- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/ConfirmManagedSyncDataDialogIntegrationTest.java +++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/ConfirmManagedSyncDataDialogIntegrationTest.java @@ -22,8 +22,8 @@ import org.chromium.base.test.util.CommandLineFlags; import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.ui.test.util.DummyUiActivity; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivity; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * Test for {@link ConfirmManagedSyncDataDialog} @@ -31,7 +31,7 @@ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) @Batch(ConfirmSyncDataIntegrationTest.CONFIRM_SYNC_DATA_BATCH_NAME) -public class ConfirmManagedSyncDataDialogIntegrationTest extends DummyUiActivityTestCase { +public class ConfirmManagedSyncDataDialogIntegrationTest extends BlankUiTestActivityTestCase { private static final String TEST_DOMAIN = "test.domain.example.com"; @Rule @@ -48,7 +48,7 @@ public void testDialogIsDismissedWhenRecreated() throws Exception { dialog.show(getActivity().getSupportFragmentManager(), null); InstrumentationRegistry.getInstrumentation().waitForIdleSync(); Assert.assertTrue("The dialog should be visible!", dialog.getDialog().isShowing()); - DummyUiActivity activity = ApplicationTestUtils.recreateActivity(getActivity()); + BlankUiTestActivity activity = ApplicationTestUtils.recreateActivity(getActivity()); Assert.assertNull("The dialog should be dismissed!", dialog.getDialog()); ApplicationTestUtils.finishActivity(activity); } diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/ConfirmSyncDataIntegrationTest.java b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/ConfirmSyncDataIntegrationTest.java index 5ea4a2abb7eb28..a131e4058484e3 100644 --- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/ConfirmSyncDataIntegrationTest.java +++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/ConfirmSyncDataIntegrationTest.java @@ -44,7 +44,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; /** * This class regroups the integration tests for {@link ConfirmSyncDataStateMachine}. @@ -59,7 +59,7 @@ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) @Batch(ConfirmSyncDataIntegrationTest.CONFIRM_SYNC_DATA_BATCH_NAME) -public class ConfirmSyncDataIntegrationTest extends DummyUiActivityTestCase { +public class ConfirmSyncDataIntegrationTest extends BlankUiTestActivityTestCase { public static final String CONFIRM_SYNC_DATA_BATCH_NAME = "confirm_sync_data"; private static final String OLD_ACCOUNT_NAME = "test.account.old@gmail.com"; diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SignOutDialogRenderTest.java b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SignOutDialogRenderTest.java index 3e4c20c9466615..cb9b5739fd4432 100644 --- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SignOutDialogRenderTest.java +++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SignOutDialogRenderTest.java @@ -37,8 +37,8 @@ import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.components.signin.GAIAServiceType; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivityTestCase; /** * Render tests for {@link SignOutDialogFragment} @@ -46,7 +46,7 @@ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) @Batch(Batch.PER_CLASS) -public class SignOutDialogRenderTest extends DummyUiActivityTestCase { +public class SignOutDialogRenderTest extends BlankUiTestActivityTestCase { private static final String TEST_DOMAIN = "test.domain.example.com"; @Rule diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/account_picker/AccountPickerDialogTest.java b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/account_picker/AccountPickerDialogTest.java index a803738674397f..6d099575c4421d 100644 --- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/account_picker/AccountPickerDialogTest.java +++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/account_picker/AccountPickerDialogTest.java @@ -39,7 +39,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.io.IOException; @@ -49,7 +49,7 @@ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) @Batch(Batch.PER_CLASS) -public class AccountPickerDialogTest extends DummyUiActivityTestCase { +public class AccountPickerDialogTest extends BlankUiTestActivityTestCase { @Rule public final ChromeRenderTestRule mRenderTestRule = ChromeRenderTestRule.Builder.withPublicCorpus().build(); diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/FreUMADialogTest.java b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/FreUMADialogTest.java index ecfb4f6bfecdab..9817ee4dfa79ce 100644 --- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/FreUMADialogTest.java +++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/FreUMADialogTest.java @@ -51,7 +51,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.NightModeTestUtils; import java.io.IOException; @@ -63,8 +63,8 @@ @Batch(Batch.PER_CLASS) public class FreUMADialogTest { @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Rule public final MockitoRule mMockitoRule = MockitoJUnit.rule(); diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarProgressBarTest.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarProgressBarTest.java index 3c3a95ff2fd33d..84fa831d3c1523 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarProgressBarTest.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/ToolbarProgressBarTest.java @@ -29,7 +29,7 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.components.browser_ui.widget.ClipDrawableProgressBar.ProgressBarObserver; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.UiRestriction; import java.util.concurrent.TimeoutException; @@ -39,7 +39,7 @@ */ @RunWith(ChromeJUnit4ClassRunner.class) @Restriction(UiRestriction.RESTRICTION_TYPE_PHONE) -public class ToolbarProgressBarTest extends DummyUiActivityTestCase { +public class ToolbarProgressBarTest extends BlankUiTestActivityTestCase { private final CallbackHelper mProgressUpdateHelper = new CallbackHelper(); private final CallbackHelper mProgressVisibilityHelper = new CallbackHelper(); private ToolbarProgressBar mProgressBar; diff --git a/chrome/browser/ui/android/webid/internal/java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionViewTest.java b/chrome/browser/ui/android/webid/internal/java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionViewTest.java index 96f6b1ee568316..dd5b01fdf30481 100644 --- a/chrome/browser/ui/android/webid/internal/java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionViewTest.java +++ b/chrome/browser/ui/android/webid/internal/java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionViewTest.java @@ -51,7 +51,7 @@ import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.PropertyModel; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.url.GURL; import org.chromium.url.JUnitTestGURLs; @@ -76,12 +76,12 @@ public class AccountSelectionViewTest { private Callback mAccountCallback; private Runnable mAutoSignInCancelCallback; - private DummyUiActivity mActivity; + private BlankUiTestActivity mActivity; private ModelList mSheetItems; private View mContentView; @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Before public void setUp() throws Exception { diff --git a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/SnackbarTest.java b/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/SnackbarTest.java index 73f893d230db71..ac7b35b076b213 100644 --- a/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/SnackbarTest.java +++ b/chrome/browser/ui/messages/android/java/src/org/chromium/chrome/browser/ui/messages/snackbar/SnackbarTest.java @@ -28,8 +28,8 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.UiThreadTaskTraits; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; import java.util.concurrent.TimeUnit; @@ -61,8 +61,8 @@ public void onAction(Object actionData) {} @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private static Activity sActivity; private boolean mDismissed; diff --git a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelperTest.java b/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelperTest.java index b219b768c9f8d3..d7cfa137da6b6b 100644 --- a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelperTest.java +++ b/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelperTest.java @@ -49,14 +49,14 @@ import org.chromium.components.feature_engagement.Tracker; import org.chromium.components.feature_engagement.TriggerDetails; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; /** Integration tests for UserEducationHelper. */ @RunWith(BaseJUnit4ClassRunner.class) public final class UserEducationHelperTest { @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); @Mock private Tracker mTracker; diff --git a/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/iph/VideoIPHTest.java b/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/iph/VideoIPHTest.java index c8c137d47a7746..13e61639dcdeb2 100644 --- a/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/iph/VideoIPHTest.java +++ b/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/iph/VideoIPHTest.java @@ -36,7 +36,7 @@ import org.chromium.chrome.browser.video_tutorials.test.TestImageFetcher; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import java.util.HashMap; @@ -46,8 +46,8 @@ @RunWith(ChromeJUnit4ClassRunner.class) public class VideoIPHTest { @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private Activity mActivity; private VideoIPHCoordinator mCoordinator; diff --git a/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/languages/LanguagePickerTest.java b/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/languages/LanguagePickerTest.java index e818d8038cbb11..171c37c5e53b16 100644 --- a/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/languages/LanguagePickerTest.java +++ b/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/languages/LanguagePickerTest.java @@ -33,7 +33,7 @@ import org.chromium.chrome.browser.video_tutorials.test.TestVideoTutorialService; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; /** * Tests for {@link LanguagePickerCoordinator}. @@ -41,8 +41,8 @@ @RunWith(ChromeJUnit4ClassRunner.class) public class LanguagePickerTest { @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private Activity mActivity; private View mContentView; diff --git a/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/list/TutorialListCoordinatorTest.java b/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/list/TutorialListCoordinatorTest.java index 61d563fd7d3d66..a04b0603a6d1d8 100644 --- a/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/list/TutorialListCoordinatorTest.java +++ b/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/list/TutorialListCoordinatorTest.java @@ -36,7 +36,7 @@ import org.chromium.chrome.browser.video_tutorials.test.TestVideoTutorialService; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; /** * Tests for {@link TutorialListCoordinator}. @@ -44,8 +44,8 @@ @RunWith(ChromeJUnit4ClassRunner.class) public class TutorialListCoordinatorTest { @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private Activity mActivity; private View mContentView; diff --git a/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/player/VideoPlayerViewBinderTest.java b/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/player/VideoPlayerViewBinderTest.java index 809f2281b0e243..e0747502405571 100644 --- a/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/player/VideoPlayerViewBinderTest.java +++ b/chrome/browser/video_tutorials/internal/android/java/src/org/chromium/chrome/browser/video_tutorials/player/VideoPlayerViewBinderTest.java @@ -35,7 +35,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import java.util.concurrent.atomic.AtomicBoolean; @@ -45,8 +45,8 @@ @RunWith(ChromeJUnit4ClassRunner.class) public class VideoPlayerViewBinderTest { @Rule - public BaseActivityTestRule mActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public BaseActivityTestRule mActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private Activity mActivity; private VideoPlayerView mVideoPlayerView; diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/Features.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/Features.java index 4ca1ae4b0a3d28..bc94df30f545d0 100644 --- a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/Features.java +++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/Features.java @@ -137,7 +137,7 @@ private static void reset(boolean forInstrumentation) { } /** - * Feature processor intended to be used in Robolectric and {@link DummyUiActivityTestCase} + * Feature processor intended to be used in Robolectric and {@link BlankUiTestActivityTestCase} * tests. The collected feature states would be applied to {@link ChromeFeatureList}'s * internal test-only feature map. */ diff --git a/components/browser_ui/bottomsheet/android/internal/java/src/org/chromium/components/browser_ui/bottomsheet/BottomSheetObserverTest.java b/components/browser_ui/bottomsheet/android/internal/java/src/org/chromium/components/browser_ui/bottomsheet/BottomSheetObserverTest.java index 92ebeff25e1219..789a93c3717c77 100644 --- a/components/browser_ui/bottomsheet/android/internal/java/src/org/chromium/components/browser_ui/bottomsheet/BottomSheetObserverTest.java +++ b/components/browser_ui/bottomsheet/android/internal/java/src/org/chromium/components/browser_ui/bottomsheet/BottomSheetObserverTest.java @@ -29,7 +29,7 @@ import org.chromium.components.browser_ui.bottomsheet.BottomSheetController.StateChangeReason; import org.chromium.components.browser_ui.widget.scrim.ScrimCoordinator; import org.chromium.ui.KeyboardVisibilityDelegate; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.UiRestriction; import java.util.concurrent.TimeoutException; @@ -98,8 +98,8 @@ public float getLastOffsetChangedValue() { } @ClassRule - public static BaseActivityTestRule mTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule mTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private TestSheetObserver mObserver; private TestBottomSheetContent mSheetContent; private BottomSheetController mBottomSheetController; diff --git a/components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/ContactsPickerDialogTest.java b/components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/ContactsPickerDialogTest.java index f165e8c8083ff1..10cd2a28c795d0 100644 --- a/components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/ContactsPickerDialogTest.java +++ b/components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/ContactsPickerDialogTest.java @@ -50,8 +50,8 @@ import org.chromium.ui.base.ActivityWindowAndroid; import org.chromium.ui.base.IntentRequestTracker; import org.chromium.ui.base.WindowAndroid; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; import org.chromium.ui.test.util.RenderTestRule; import java.nio.ByteBuffer; @@ -71,8 +71,8 @@ public class ContactsPickerDialogTest public static DisableAnimationsTestRule mDisableAnimationsTestRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private Activity mActivity; private WindowAndroid mWindowAndroid; diff --git a/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/AppModalPresenterTest.java b/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/AppModalPresenterTest.java index 602bb92f0bfdd9..6a015ffaaa9d98 100644 --- a/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/AppModalPresenterTest.java +++ b/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/AppModalPresenterTest.java @@ -47,8 +47,8 @@ import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; import org.chromium.ui.modaldialog.ModalDialogProperties; import org.chromium.ui.modelutil.PropertyModel; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; /** * Tests for {@link AppModalPresenter}. @@ -59,8 +59,8 @@ public class AppModalPresenterTest { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private class TestObserver implements ModalDialogTestUtils.TestDialogDismissedObserver { public final CallbackHelper onDialogDismissedCallback = new CallbackHelper(); diff --git a/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogViewTest.java b/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogViewTest.java index 9c79f57a64143a..8ef30fe5d8ecb7 100644 --- a/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogViewTest.java +++ b/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogViewTest.java @@ -49,8 +49,8 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modaldialog.ModalDialogProperties; import org.chromium.ui.modelutil.PropertyModel; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; /** * Tests for {@link ModalDialogView}. @@ -61,8 +61,8 @@ public class ModalDialogViewTest { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private static Activity sActivity; private static Resources sResources; diff --git a/components/browser_ui/photo_picker/android/java/src/org/chromium/components/browser_ui/photo_picker/PhotoPickerDialogTest.java b/components/browser_ui/photo_picker/android/java/src/org/chromium/components/browser_ui/photo_picker/PhotoPickerDialogTest.java index 00a614ce98b801..22e77b979899bf 100644 --- a/components/browser_ui/photo_picker/android/java/src/org/chromium/components/browser_ui/photo_picker/PhotoPickerDialogTest.java +++ b/components/browser_ui/photo_picker/android/java/src/org/chromium/components/browser_ui/photo_picker/PhotoPickerDialogTest.java @@ -44,8 +44,8 @@ import org.chromium.ui.base.IntentRequestTracker; import org.chromium.ui.base.PhotoPickerListener; import org.chromium.ui.base.WindowAndroid; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivityTestCase; import org.chromium.ui.test.util.RenderTestRule; import java.io.File; @@ -58,7 +58,7 @@ * Tests for the PhotoPickerDialog class. */ @RunWith(BaseJUnit4ClassRunner.class) -public class PhotoPickerDialogTest extends DummyUiActivityTestCase +public class PhotoPickerDialogTest extends BlankUiTestActivityTestCase implements PhotoPickerListener, SelectionObserver, DecoderServiceHost.DecoderStatusCallback, PickerVideoPlayer.VideoPlaybackStatusCallback, AnimationListener { diff --git a/components/browser_ui/share/android/java/src/org/chromium/components/browser_ui/share/ShareImageFileUtilsTest.java b/components/browser_ui/share/android/java/src/org/chromium/components/browser_ui/share/ShareImageFileUtilsTest.java index 94a64b65e6893c..e346ca2f291947 100644 --- a/components/browser_ui/share/android/java/src/org/chromium/components/browser_ui/share/ShareImageFileUtilsTest.java +++ b/components/browser_ui/share/android/java/src/org/chromium/components/browser_ui/share/ShareImageFileUtilsTest.java @@ -38,7 +38,7 @@ import org.chromium.base.test.util.DisabledTest; import org.chromium.chrome.browser.FileProviderHelper; import org.chromium.ui.base.Clipboard; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.io.File; import java.io.IOException; @@ -49,7 +49,7 @@ * Tests of {@link ShareImageFileUtils}. */ @RunWith(BaseJUnit4ClassRunner.class) -public class ShareImageFileUtilsTest extends DummyUiActivityTestCase { +public class ShareImageFileUtilsTest extends BlankUiTestActivityTestCase { private static final long WAIT_TIMEOUT_SECONDS = 30L; private static final byte[] TEST_IMAGE_DATA = new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; private static final String TEST_IMAGE_FILE_NAME = "chrome-test-bitmap"; diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/MoreProgressButtonTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/MoreProgressButtonTest.java index 3ed1c298ccd583..793ff43bb8faae 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/MoreProgressButtonTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/MoreProgressButtonTest.java @@ -29,8 +29,8 @@ import org.chromium.base.test.util.Feature; import org.chromium.components.browser_ui.widget.MoreProgressButton.State; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; /** * Tests for {@link MoreProgressButton}. @@ -41,8 +41,8 @@ public class MoreProgressButtonTest { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private static Activity sActivity; private static FrameLayout sContentView; diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/PromoDialogRenderTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/PromoDialogRenderTest.java index 8fed184d0b7dc8..6ce4aa1af697bd 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/PromoDialogRenderTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/PromoDialogRenderTest.java @@ -25,7 +25,7 @@ import org.chromium.components.browser_ui.widget.PromoDialog.DialogParams; import org.chromium.components.browser_ui.widget.test.R; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import org.chromium.ui.test.util.RenderTestRule; @@ -36,7 +36,7 @@ */ @RunWith(ParameterizedRunner.class) @UseRunnerDelegate(BaseJUnit4RunnerDelegate.class) -public class PromoDialogRenderTest extends DummyUiActivityTestCase { +public class PromoDialogRenderTest extends BlankUiTestActivityTestCase { @ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -48,7 +48,7 @@ public class PromoDialogRenderTest extends DummyUiActivityTestCase { + "very very very very long string"; public PromoDialogRenderTest(boolean nightModeEnabled) { - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/PromoDialogTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/PromoDialogTest.java index 2797bab64f2cc3..bda78e2258af1c 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/PromoDialogTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/PromoDialogTest.java @@ -30,8 +30,8 @@ import org.chromium.components.browser_ui.widget.PromoDialog.DialogParams; import org.chromium.components.browser_ui.widget.test.R; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; import java.util.concurrent.Callable; @@ -44,8 +44,8 @@ public class PromoDialogTest { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); /** * Creates a PromoDialog. Doesn't call {@link PromoDialog#show} because there is no Window to diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonRenderTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonRenderTest.java index e747e215d6e763..dc2dd940e242e3 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonRenderTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonRenderTest.java @@ -24,7 +24,7 @@ import org.chromium.base.test.util.Feature; import org.chromium.components.browser_ui.widget.test.R; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import org.chromium.ui.test.util.RenderTestRule; @@ -37,7 +37,7 @@ */ @RunWith(ParameterizedRunner.class) @UseRunnerDelegate(BaseJUnit4RunnerDelegate.class) -public class RadioButtonRenderTest extends DummyUiActivityTestCase { +public class RadioButtonRenderTest extends BlankUiTestActivityTestCase { @ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -71,7 +71,7 @@ public class RadioButtonRenderTest extends DummyUiActivityTestCase { public RadioButtonRenderTest(boolean nightModeEnabled) { mFakeBgColor = nightModeEnabled ? Color.BLACK : Color.WHITE; - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonWithDescriptionAndAuxButtonTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonWithDescriptionAndAuxButtonTest.java index 75f4ae620836d1..457541c6c2b6c5 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonWithDescriptionAndAuxButtonTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonWithDescriptionAndAuxButtonTest.java @@ -27,8 +27,8 @@ import org.chromium.base.test.util.CallbackHelper; import org.chromium.components.browser_ui.widget.test.R; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; /** * Unit tests for {@link RadioButtonWithDescriptionAndAuxButton}. @@ -39,8 +39,8 @@ public class RadioButtonWithDescriptionAndAuxButtonTest { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private class AuxButtonClickedListener implements RadioButtonWithDescriptionAndAuxButton.OnAuxButtonClickedListener { diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonWithEditTextTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonWithEditTextTest.java index 1fd1c90f65cbf7..fe2885d90d2f8c 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonWithEditTextTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonWithEditTextTest.java @@ -38,8 +38,8 @@ import org.chromium.components.browser_ui.widget.test.R; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.KeyboardVisibilityDelegate; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; /** * Unit tests for {@link RadioButtonWithEditText}. @@ -50,8 +50,8 @@ public class RadioButtonWithEditTextTest { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private class TestListener implements RadioButtonWithEditText.OnTextChangeListener { private CharSequence mCurrentText; diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonWithIconRenderTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonWithIconRenderTest.java index 97890b4a0ccee3..23c65bb413df89 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonWithIconRenderTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/RadioButtonWithIconRenderTest.java @@ -24,7 +24,7 @@ import org.chromium.base.test.util.Feature; import org.chromium.components.browser_ui.widget.test.R; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import org.chromium.ui.test.util.RenderTestRule; @@ -35,7 +35,7 @@ */ @RunWith(ParameterizedRunner.class) @UseRunnerDelegate(BaseJUnit4RunnerDelegate.class) -public class RadioButtonWithIconRenderTest extends DummyUiActivityTestCase { +public class RadioButtonWithIconRenderTest extends BlankUiTestActivityTestCase { @ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -61,7 +61,7 @@ public class RadioButtonWithIconRenderTest extends DummyUiActivityTestCase { public RadioButtonWithIconRenderTest(boolean nightModeEnabled) { mFakeBgColor = nightModeEnabled ? Color.BLACK : Color.WHITE; - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButtonTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButtonTest.java index 6a0f7a679c2f34..672a79fddbf792 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButtonTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButtonTest.java @@ -19,7 +19,7 @@ import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.base.test.util.Batch; import org.chromium.components.browser_ui.widget.R; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; /** * Unit tests for {@link ListMenuButton}. @@ -28,8 +28,8 @@ @Batch(Batch.UNIT_TESTS) public class ListMenuButtonTest { @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private Context mContext; @Before diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuRenderTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuRenderTest.java index d513c354e66a68..de72c8febd3435 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuRenderTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuRenderTest.java @@ -26,7 +26,7 @@ import org.chromium.components.browser_ui.widget.test.R; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import org.chromium.ui.test.util.RenderTestRule; @@ -38,7 +38,7 @@ */ @RunWith(ParameterizedRunner.class) @UseRunnerDelegate(BaseJUnit4RunnerDelegate.class) -public class ListMenuRenderTest extends DummyUiActivityTestCase { +public class ListMenuRenderTest extends BlankUiTestActivityTestCase { @ParameterAnnotations.ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -49,7 +49,7 @@ public class ListMenuRenderTest extends DummyUiActivityTestCase { private View mView; public ListMenuRenderTest(boolean nightModeEnabled) { - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } @@ -82,7 +82,7 @@ public void setUpTest() throws Exception { @Override public void tearDownTest() throws Exception { - NightModeTestUtils.tearDownNightModeForDummyUiActivity(); + NightModeTestUtils.tearDownNightModeForBlankUiTestActivity(); super.tearDownTest(); } diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/promo/PromoCardImpressionTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/promo/PromoCardImpressionTest.java index 2c17fb7728007d..b9033030976ce8 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/promo/PromoCardImpressionTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/promo/PromoCardImpressionTest.java @@ -26,8 +26,8 @@ import org.chromium.base.test.util.FlakyTest; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; import java.util.concurrent.TimeoutException; @@ -41,8 +41,8 @@ public class PromoCardImpressionTest { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private static Activity sActivity; private static FrameLayout sContent; diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/promo/PromoCardViewRenderTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/promo/PromoCardViewRenderTest.java index 781e1fc626c8f1..c9a16cf81c555a 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/promo/PromoCardViewRenderTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/promo/PromoCardViewRenderTest.java @@ -31,7 +31,7 @@ import org.chromium.components.browser_ui.widget.test.R; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import org.chromium.ui.test.util.RenderTestRule; @@ -42,7 +42,7 @@ */ @RunWith(ParameterizedRunner.class) @UseRunnerDelegate(BaseJUnit4RunnerDelegate.class) -public class PromoCardViewRenderTest extends DummyUiActivityTestCase { +public class PromoCardViewRenderTest extends BlankUiTestActivityTestCase { @ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -51,7 +51,7 @@ public class PromoCardViewRenderTest extends DummyUiActivityTestCase { public RenderTestRule mRenderTestRule = RenderTestRule.Builder.withPublicCorpus().build(); public PromoCardViewRenderTest(boolean nightModeEnabled) { - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/scrim/ScrimTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/scrim/ScrimTest.java index a46a763223fe91..f379f0e53a5014 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/scrim/ScrimTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/scrim/ScrimTest.java @@ -42,8 +42,8 @@ import org.chromium.base.test.util.Feature; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; @@ -55,8 +55,8 @@ public class ScrimTest { @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule activityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule activityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private static Activity sActivity; private static FrameLayout sParent; diff --git a/components/embedder_support/android/javatests/src/org/chromium/components/embedder_support/delegate/ColorPickerDialogRenderTest.java b/components/embedder_support/android/javatests/src/org/chromium/components/embedder_support/delegate/ColorPickerDialogRenderTest.java index 30a3a8ede0469c..06c293be36e57b 100644 --- a/components/embedder_support/android/javatests/src/org/chromium/components/embedder_support/delegate/ColorPickerDialogRenderTest.java +++ b/components/embedder_support/android/javatests/src/org/chromium/components/embedder_support/delegate/ColorPickerDialogRenderTest.java @@ -25,7 +25,7 @@ import org.chromium.base.test.util.Feature; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.R; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import org.chromium.ui.test.util.RenderTestRule; @@ -37,7 +37,7 @@ */ @RunWith(ParameterizedRunner.class) @UseRunnerDelegate(BaseJUnit4RunnerDelegate.class) -public class ColorPickerDialogRenderTest extends DummyUiActivityTestCase { +public class ColorPickerDialogRenderTest extends BlankUiTestActivityTestCase { @ParameterAnnotations.ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -48,7 +48,7 @@ public class ColorPickerDialogRenderTest extends DummyUiActivityTestCase { private View mView; public ColorPickerDialogRenderTest(boolean nightModeEnabled) { - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } diff --git a/components/external_intents/android/javatests/src/org/chromium/components/external_intents/ExternalNavigationHandlerTest.java b/components/external_intents/android/javatests/src/org/chromium/components/external_intents/ExternalNavigationHandlerTest.java index 15508b262d54f1..2ba899fea037cf 100644 --- a/components/external_intents/android/javatests/src/org/chromium/components/external_intents/ExternalNavigationHandlerTest.java +++ b/components/external_intents/android/javatests/src/org/chromium/components/external_intents/ExternalNavigationHandlerTest.java @@ -56,7 +56,7 @@ import org.chromium.content_public.browser.test.NativeLibraryTestUtils; import org.chromium.ui.base.PageTransition; import org.chromium.ui.base.WindowAndroid; -import org.chromium.ui.test.util.DummyUiActivity; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.url.GURL; import org.chromium.url.Origin; @@ -1009,7 +1009,7 @@ public void testFallbackUrl_FallbackToMarketApp_Incognito() { filter.addDataScheme("market"); ActivityMonitor monitor = InstrumentationRegistry.getInstrumentation().addMonitor( filter, new Instrumentation.ActivityResult(Activity.RESULT_OK, null), true); - Intent dummyIntent = new Intent(mApplicationContextToRestore, DummyUiActivity.class); + Intent dummyIntent = new Intent(mApplicationContextToRestore, BlankUiTestActivity.class); dummyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Activity activity = InstrumentationRegistry.getInstrumentation().startActivitySync(dummyIntent); @@ -1065,7 +1065,7 @@ public void testFallbackUrl_FallbackToMarketApp_Incognito() { @MediumTest public void testFallbackUrl_ChromeCanHandle_Incognito() { mDelegate.add(new IntentActivity("https", "package")); - Intent dummyIntent = new Intent(mApplicationContextToRestore, DummyUiActivity.class); + Intent dummyIntent = new Intent(mApplicationContextToRestore, BlankUiTestActivity.class); dummyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Activity activity = InstrumentationRegistry.getInstrumentation().startActivitySync(dummyIntent); @@ -1119,7 +1119,7 @@ public void testFallbackUrl_FallbackToMarketApp_Incognito_DelegateHandleDialogPr filter.addDataScheme("market"); ActivityMonitor monitor = InstrumentationRegistry.getInstrumentation().addMonitor( filter, new Instrumentation.ActivityResult(Activity.RESULT_OK, null), true); - Intent dummyIntent = new Intent(mApplicationContextToRestore, DummyUiActivity.class); + Intent dummyIntent = new Intent(mApplicationContextToRestore, BlankUiTestActivity.class); dummyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Activity activity = InstrumentationRegistry.getInstrumentation().startActivitySync(dummyIntent); @@ -1185,7 +1185,7 @@ public void testFallbackUrl_FallbackToMarketApp_Incognito_DelegateHandleDialogPr @MediumTest public void testFallbackUrl_ChromeCanHandle_Incognito_DelegateHandleDialogPresentation() { mDelegate.add(new IntentActivity("https", "package")); - Intent dummyIntent = new Intent(mApplicationContextToRestore, DummyUiActivity.class); + Intent dummyIntent = new Intent(mApplicationContextToRestore, BlankUiTestActivity.class); dummyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Activity activity = InstrumentationRegistry.getInstrumentation().startActivitySync(dummyIntent); diff --git a/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerRenderTest.java b/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerRenderTest.java index bd8332da47000a..1b6ffd2df6008d 100644 --- a/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerRenderTest.java +++ b/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerRenderTest.java @@ -32,7 +32,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; import org.chromium.ui.test.util.RenderTestRule; @@ -42,7 +42,7 @@ */ @RunWith(ParameterizedRunner.class) @UseRunnerDelegate(BaseJUnit4RunnerDelegate.class) -public class MessageBannerRenderTest extends DummyUiActivityTestCase { +public class MessageBannerRenderTest extends BlankUiTestActivityTestCase { @ClassParameter private static List sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -51,7 +51,7 @@ public class MessageBannerRenderTest extends DummyUiActivityTestCase { public RenderTestRule mRenderTestRule = RenderTestRule.Builder.withPublicCorpus().build(); public MessageBannerRenderTest(boolean nightModeEnabled) { - NightModeTestUtils.setUpNightModeForDummyUiActivity(nightModeEnabled); + NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); } diff --git a/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerViewTest.java b/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerViewTest.java index f3943d09162705..5cc340125af681 100644 --- a/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerViewTest.java +++ b/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerViewTest.java @@ -35,8 +35,8 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; /** * Instrumentation tests for MessageBannerView. @@ -51,8 +51,8 @@ public class MessageBannerViewTest { new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule sActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule sActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private static Activity sActivity; private static ViewGroup sContentView; diff --git a/components/messages/android/internal/java/src/org/chromium/components/messages/SingleActionMessageTest.java b/components/messages/android/internal/java/src/org/chromium/components/messages/SingleActionMessageTest.java index b96743cc3f886a..874da49e693ec8 100644 --- a/components/messages/android/internal/java/src/org/chromium/components/messages/SingleActionMessageTest.java +++ b/components/messages/android/internal/java/src/org/chromium/components/messages/SingleActionMessageTest.java @@ -33,8 +33,8 @@ import org.chromium.base.test.util.CallbackHelper; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.modelutil.PropertyModel; +import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule; -import org.chromium.ui.test.util.DummyUiActivity; /** * Tests for {@link SingleActionMessage}. @@ -45,8 +45,8 @@ public class SingleActionMessageTest { public static DisableAnimationsTestRule sDisableAnimationsRule = new DisableAnimationsTestRule(); @ClassRule - public static BaseActivityTestRule sActivityTestRule = - new BaseActivityTestRule<>(DummyUiActivity.class); + public static BaseActivityTestRule sActivityTestRule = + new BaseActivityTestRule<>(BlankUiTestActivity.class); private static Activity sActivity; diff --git a/components/paint_preview/player/android/javatests/src/org/chromium/components/paintpreview/player/PaintPreviewPlayerTest.java b/components/paint_preview/player/android/javatests/src/org/chromium/components/paintpreview/player/PaintPreviewPlayerTest.java index 2b16f6d41ed488..2dec1c4d7145ca 100644 --- a/components/paint_preview/player/android/javatests/src/org/chromium/components/paintpreview/player/PaintPreviewPlayerTest.java +++ b/components/paint_preview/player/android/javatests/src/org/chromium/components/paintpreview/player/PaintPreviewPlayerTest.java @@ -31,7 +31,7 @@ import org.chromium.base.test.util.CriteriaHelper; import org.chromium.base.test.util.DisableIf; import org.chromium.content_public.browser.UiThreadTaskTraits; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.url.GURL; import java.util.List; @@ -40,7 +40,7 @@ * Instrumentation tests for the Paint Preview player. */ @RunWith(BaseJUnit4ClassRunner.class) -public class PaintPreviewPlayerTest extends DummyUiActivityTestCase { +public class PaintPreviewPlayerTest extends BlankUiTestActivityTestCase { private static final long TIMEOUT_MS = 5000; private static final String TEST_DIRECTORY_KEY = "test_dir"; diff --git a/docs/ui/android/mvc_testing.md b/docs/ui/android/mvc_testing.md index 8bdeface3c3d7a..179a3256dc7bdb 100644 --- a/docs/ui/android/mvc_testing.md +++ b/docs/ui/android/mvc_testing.md @@ -50,7 +50,7 @@ The View/ViewBinder should be tested as an independent unit. ### Best practices for testability for your View: - * Tests for UI should be based on the [DummyUiActivity](/ui/android/javatests/src/org/chromium/ui/test/util/DummyUiActivity.java). This activity does not have any dependencies on the Chrome browser and allows you to test your UI in isolation. This ensures you are not competing against other Chrome tasks and can write a test that is much faster and less flaky than legacy UI instrumentation tests. + * Tests for UI should be based on the [BlankUiTestActivity](/ui/android/javatests/src/org/chromium/ui/test/util/BlankUiTestActivity.java). This activity does not have any dependencies on the Chrome browser and allows you to test your UI in isolation. This ensures you are not competing against other Chrome tasks and can write a test that is much faster and less flaky than legacy UI instrumentation tests. * When adding tests for your UI component, add a [RenderTest](/ui/android/javatests/src/org/chromium/ui/test/util/RENDER_TESTS.md) to ensure the UI is consistent from release to release unless you explicitly changed it. ### Useful helpers / Links diff --git a/docs/ui/android/night_mode.md b/docs/ui/android/night_mode.md index eb9e24f18981f6..0a650e97e38687 100644 --- a/docs/ui/android/night_mode.md +++ b/docs/ui/android/night_mode.md @@ -122,13 +122,13 @@ If adding a new theme, make sure the parent (or any indirect ancestor) theme of Render tests are the recommended way to verify the appearance of night mode UI. If you are not familiar with render tests, please take a look at [render test instructions](/ui/android/javatests/src/org/chromium/ui/test/util/RENDER_TESTS.md) to learn about how to write a new render test and upload golden images. -**For tests using DummyUiActivity:** +**For tests using BlankUiTestActivity:** * Put all the render tests into a separate test suite * Use class parameter [`NightModeTestUtils.NightModeParams.class`](https://cs.chromium.org/chromium/src/ui/android/javatests/src/org/chromium/ui/test/util/NightModeTestUtils.java?type=cs&q=NightModeTestUtils.NightModeParams) * Pass in a boolean parameter that indicates night mode state in constructor -* Set up night mode in constructor by calling [`NightModeTestUtils#setUpNightModeForDummyUiActivity()`](https://cs.chromium.org/chromium/src/ui/android/javatests/src/org/chromium/ui/test/util/NightModeTestUtils.java?type=cs&q=setUpNightModeForDummyUiActivity&sq=package:chromium) and [`RenderTestRule#setNightModeEnabled()`](https://cs.chromium.org/chromium/src/ui/android/javatests/src/org/chromium/ui/test/util/RenderTestRule.java?type=cs&q=setNightModeEnabled) -* During [`tearDownTest()`](https://cs.chromium.org/chromium/src/ui/android/javatests/src/org/chromium/ui/test/util/DummyUiActivityTestCase.java?type=cs&q=tearDownTest), reset night mode state by calling [`NightModeTestUtils#tearDownNightModeForDummyUiActivity()`](https://cs.chromium.org/chromium/src/ui/android/javatests/src/org/chromium/ui/test/util/NightModeTestUtils.java?type=cs&q=tearDownNightModeForDummyUiActivity) +* Set up night mode in constructor by calling [`NightModeTestUtils#setUpNightModeForBlankUiTestActivity()`](https://cs.chromium.org/chromium/src/ui/android/javatests/src/org/chromium/ui/test/util/NightModeTestUtils.java?type=cs&q=setUpNightModeForBlankUiTestActivity&sq=package:chromium) and [`RenderTestRule#setNightModeEnabled()`](https://cs.chromium.org/chromium/src/ui/android/javatests/src/org/chromium/ui/test/util/RenderTestRule.java?type=cs&q=setNightModeEnabled) +* During [`tearDownTest()`](https://cs.chromium.org/chromium/src/ui/android/javatests/src/org/chromium/ui/test/util/BlankUiTestActivityTestCase.java?type=cs&q=tearDownTest), reset night mode state by calling [`NightModeTestUtils#tearDownNightModeForBlankUiTestActivity()`](https://cs.chromium.org/chromium/src/ui/android/javatests/src/org/chromium/ui/test/util/NightModeTestUtils.java?type=cs&q=tearDownNightModeForBlankUiTestActivity) See [this CL](https://chromium-review.googlesource.com/c/chromium/src/+/1613883) as an example diff --git a/ui/android/BUILD.gn b/ui/android/BUILD.gn index 8e1a2307c97585..848dc9107b3d2b 100644 --- a/ui/android/BUILD.gn +++ b/ui/android/BUILD.gn @@ -413,9 +413,9 @@ android_library("ui_junit_test_support") { android_library("ui_java_test_support") { testonly = true sources = [ + "javatests/src/org/chromium/ui/test/util/BlankUiTestActivity.java", + "javatests/src/org/chromium/ui/test/util/BlankUiTestActivityTestCase.java", "javatests/src/org/chromium/ui/test/util/DisableAnimationsTestRule.java", - "javatests/src/org/chromium/ui/test/util/DummyUiActivity.java", - "javatests/src/org/chromium/ui/test/util/DummyUiActivityTestCase.java", "javatests/src/org/chromium/ui/test/util/NightModeTestUtils.java", "javatests/src/org/chromium/ui/test/util/RenderTestRule.java", "javatests/src/org/chromium/ui/test/util/UiDisableIf.java", diff --git a/ui/android/DEPS b/ui/android/DEPS index a46a15656713b3..3e15afd690dbb1 100644 --- a/ui/android/DEPS +++ b/ui/android/DEPS @@ -29,7 +29,7 @@ specific_include_rules = { ".*test\.(cc|h)": [ "+components/viz/test" ], - ".*DummyUiActivity\.java": [ + ".*BlankUiTestActivity\.java": [ "+components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog", ], } diff --git a/ui/android/java/src/org/chromium/ui/widget/TextViewWithTightWrapTest.java b/ui/android/java/src/org/chromium/ui/widget/TextViewWithTightWrapTest.java index ac3294402f0a8a..2303e201fa2467 100644 --- a/ui/android/java/src/org/chromium/ui/widget/TextViewWithTightWrapTest.java +++ b/ui/android/java/src/org/chromium/ui/widget/TextViewWithTightWrapTest.java @@ -21,14 +21,14 @@ import org.chromium.base.test.util.Feature; import org.chromium.components.browser_ui.widget.R; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.RenderTestRule; /** Render tests for {@link TextViewWithTightWrap}. */ @RunWith(BaseJUnit4ClassRunner.class) -public class TextViewWithTightWrapTest extends DummyUiActivityTestCase { +public class TextViewWithTightWrapTest extends BlankUiTestActivityTestCase { private static final int RENDER_TEST_REVISION = 2; private static final String RENDER_TEST_REVISION_DESCRIPTION = "Update the text style."; diff --git a/ui/android/javatests/src/org/chromium/ui/base/ClipboardAndroidTest.java b/ui/android/javatests/src/org/chromium/ui/base/ClipboardAndroidTest.java index ed900f44424cd6..f30e210aae4728 100644 --- a/ui/android/javatests/src/org/chromium/ui/base/ClipboardAndroidTest.java +++ b/ui/android/javatests/src/org/chromium/ui/base/ClipboardAndroidTest.java @@ -27,7 +27,7 @@ import org.chromium.base.test.util.MinAndroidSdkLevel; import org.chromium.content_public.browser.test.NativeLibraryTestUtils; import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.ui.test.util.DummyUiActivityTestCase; +import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import java.util.concurrent.TimeoutException; @@ -36,7 +36,7 @@ */ @RunWith(BaseJUnit4ClassRunner.class) @Batch(Batch.UNIT_TESTS) -public class ClipboardAndroidTest extends DummyUiActivityTestCase { +public class ClipboardAndroidTest extends BlankUiTestActivityTestCase { private static final String TEXT_URL = "http://www.foo.com/"; private static final String MIX_TEXT_URL = "test http://www.foo.com http://www.bar.com"; private static final String MIX_TEXT_URL_NO_PROTOCOL = "test www.foo.com www.bar.com"; diff --git a/ui/android/javatests/src/org/chromium/ui/test/util/DummyUiActivity.java b/ui/android/javatests/src/org/chromium/ui/test/util/BlankUiTestActivity.java similarity index 94% rename from ui/android/javatests/src/org/chromium/ui/test/util/DummyUiActivity.java rename to ui/android/javatests/src/org/chromium/ui/test/util/BlankUiTestActivity.java index 2d93f5c73b2c88..acb08f6df7388b 100644 --- a/ui/android/javatests/src/org/chromium/ui/test/util/DummyUiActivity.java +++ b/ui/android/javatests/src/org/chromium/ui/test/util/BlankUiTestActivity.java @@ -18,8 +18,8 @@ import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; import org.chromium.ui.modaldialog.ModalDialogManagerHolder; -/** Dummy activity to test UI components without Chrome browser initialization and natives. */ -public class DummyUiActivity extends AppCompatActivity implements ModalDialogManagerHolder { +/** Simplified activity to test UI components without Chrome browser initialization and natives. */ +public class BlankUiTestActivity extends AppCompatActivity implements ModalDialogManagerHolder { private static int sTestTheme; private static int sTestLayout; diff --git a/ui/android/javatests/src/org/chromium/ui/test/util/DummyUiActivityTestCase.java b/ui/android/javatests/src/org/chromium/ui/test/util/BlankUiTestActivityTestCase.java similarity index 79% rename from ui/android/javatests/src/org/chromium/ui/test/util/DummyUiActivityTestCase.java rename to ui/android/javatests/src/org/chromium/ui/test/util/BlankUiTestActivityTestCase.java index 390d1dfe394149..3be022c9c33daf 100644 --- a/ui/android/javatests/src/org/chromium/ui/test/util/DummyUiActivityTestCase.java +++ b/ui/android/javatests/src/org/chromium/ui/test/util/BlankUiTestActivityTestCase.java @@ -17,14 +17,14 @@ import org.chromium.base.test.util.ApplicationTestUtils; /** - * Test case to instrument DummyUiActivity for UI testing scenarios. + * Test case to instrument BlankUiTestActivity for UI testing scenarios. * Recommend to use setUpTest() and tearDownTest() to setup and tear down instead of @Before and * @After. */ -public class DummyUiActivityTestCase { - private DummyUiActivity mActivity; +public class BlankUiTestActivityTestCase { + private BlankUiTestActivity mActivity; - private final BaseActivityTestRule mActivityTestRule; + private final BaseActivityTestRule mActivityTestRule; // Disable animations to reduce flakiness. @ClassRule @@ -34,17 +34,17 @@ public class DummyUiActivityTestCase { @Rule public final TestRule ruleChain; - /** Default constructor that creates a {@link DummyUiActivity} as expected. */ - public DummyUiActivityTestCase() { - this(new BaseActivityTestRule(DummyUiActivity.class)); + /** Default constructor that creates a {@link BlankUiTestActivity} as expected. */ + public BlankUiTestActivityTestCase() { + this(new BaseActivityTestRule(BlankUiTestActivity.class)); } /** * Constructor to allow subclasses to inject activity and rule subclasses. * @param activityTestRule Injected rule to use for activity interactions. */ - protected DummyUiActivityTestCase( - BaseActivityTestRule activityTestRule) { + protected BlankUiTestActivityTestCase( + BaseActivityTestRule activityTestRule) { mActivityTestRule = activityTestRule; ruleChain = RuleChain.outerRule(mActivityTestRule).around(new TestDriverRule()); } @@ -83,7 +83,7 @@ public void setUpTest() throws Exception { // Override this to tear down after test. public void tearDownTest() throws Exception {} - public DummyUiActivity getActivity() { + public BlankUiTestActivity getActivity() { return mActivity; } } diff --git a/ui/android/javatests/src/org/chromium/ui/test/util/NightModeTestUtils.java b/ui/android/javatests/src/org/chromium/ui/test/util/NightModeTestUtils.java index aac37abd85ed1f..b2275fb7ff6ef2 100644 --- a/ui/android/javatests/src/org/chromium/ui/test/util/NightModeTestUtils.java +++ b/ui/android/javatests/src/org/chromium/ui/test/util/NightModeTestUtils.java @@ -32,10 +32,10 @@ public List getParameters() { } /** - * Sets up the night mode state for {@link DummyUiActivity}. + * Sets up the night mode state for {@link BlankUiTestActivity}. * @param nightModeEnabled Whether night mode should be enabled. */ - public static void setUpNightModeForDummyUiActivity(boolean nightModeEnabled) { + public static void setUpNightModeForBlankUiTestActivity(boolean nightModeEnabled) { ThreadUtils.runOnUiThreadBlocking(() -> { AppCompatDelegate.setDefaultNightMode(nightModeEnabled ? AppCompatDelegate.MODE_NIGHT_YES @@ -44,9 +44,9 @@ public static void setUpNightModeForDummyUiActivity(boolean nightModeEnabled) { } /** - * Resets the night mode state for {@link DummyUiActivity}. + * Resets the night mode state for {@link BlankUiTestActivity}. */ - public static void tearDownNightModeForDummyUiActivity() { + public static void tearDownNightModeForBlankUiTestActivity() { ThreadUtils.runOnUiThreadBlocking(() -> { AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM); }); diff --git a/ui/android/javatests/src/org/chromium/ui/test/util/RenderTestRule.java b/ui/android/javatests/src/org/chromium/ui/test/util/RenderTestRule.java index e18d5d71d9c401..9c885e3ea238da 100644 --- a/ui/android/javatests/src/org/chromium/ui/test/util/RenderTestRule.java +++ b/ui/android/javatests/src/org/chromium/ui/test/util/RenderTestRule.java @@ -46,7 +46,7 @@ * {@code * * @RunWith(BaseJUnit4ClassRunner.class) - * public class MyTest extends DummyUiActivityTestCase { + * public class MyTest extends BlankUiTestActivityTestCase { * @Rule * public RenderTestRule mRenderTestRule = new RenderTestRule.Builder() * // Required. If using ANDROID_RENDER_TESTS_PUBLIC, the Builder can be created with