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 <[email protected]>
Reviewed-by: Theresa Sullivan <[email protected]>
Reviewed-by: Yaron Friedman <[email protected]>
Reviewed-by: Michael Thiessen <[email protected]>
Commit-Queue: Mark Schillaci <[email protected]>
Cr-Commit-Position: refs/heads/main@{#969056}
diff --git a/docs/ui/android/mvc_testing.md b/docs/ui/android/mvc_testing.md
index 8bdeface..179a325 100644
--- a/docs/ui/android/mvc_testing.md
+++ b/docs/ui/android/mvc_testing.md
@@ -50,7 +50,7 @@
### 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 eb9e24f..0a650e9 100644
--- a/docs/ui/android/night_mode.md
+++ b/docs/ui/android/night_mode.md
@@ -122,13 +122,13 @@
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