Skip to content

Commit

Permalink
Remove obsolete UiThreadTest presubmit rules
Browse files Browse the repository at this point in the history
The UiThreadTest files indicated to be used by the presubmit rule were
deleted here: http://crrev.com/c/5361254. The linked CL also mentions
that it is now safe to use the rules removed by this CL.

Bug: 40142780
Change-Id: I5de93074ce981dcc858d2e3c4bb969761e36bfe2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020063
Reviewed-by: Andrew Grieve <[email protected]>
Reviewed-by: Michael Thiessen <[email protected]>
Commit-Queue: Theo Cristea <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1382897}
  • Loading branch information
theocristea authored and Chromium LUCI CQ committed Nov 14, 2024
1 parent bccd52d commit 1d9a90a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
15 changes: 0 additions & 15 deletions PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,6 @@ class BanRule:
'SDK_INT check. See https://crbug.com/1116486.',
),
),
BanRule(
'import androidx.test.rule.UiThreadTestRule;',
(
'Do not use UiThreadTestRule, just use '
'@org.chromium.base.test.UiThreadTest on test methods that should run '
'on the UI thread. See https://crbug.com/1111893.',
),
),
BanRule(
'import androidx.test.annotation.UiThreadTest;',
('Do not use androidx.test.annotation.UiThreadTest, use '
'org.chromium.base.test.UiThreadTest instead. See '
'https://crbug.com/1111893.',
),
),
BanRule(
'import androidx.test.rule.ActivityTestRule;',
(
Expand Down
16 changes: 1 addition & 15 deletions PRESUBMIT_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1570,12 +1570,6 @@ def testCheckAndroidNoBannedImports(self):
MockAffectedFile('BannedTargetApi.java', [
'import android.annotation.TargetApi;',
]),
MockAffectedFile('BannedUiThreadTestRule.java', [
'import androidx.test.rule.UiThreadTestRule;',
]),
MockAffectedFile('BannedUiThreadTest.java', [
'import androidx.test.annotation.UiThreadTest;',
]),
MockAffectedFile('BannedActivityTestRule.java', [
'import androidx.test.rule.ActivityTestRule;',
]),
Expand All @@ -1601,17 +1595,9 @@ def testCheckAndroidNoBannedImports(self):
BannedTargetApi.java:1:""")))
self.assertTrue(msgs[4][0].message.startswith(
textwrap.dedent("""\
Banned imports were used.
BannedUiThreadTestRule.java:1:""")))
self.assertTrue(msgs[5][0].message.startswith(
textwrap.dedent("""\
Banned imports were used.
BannedUiThreadTest.java:1:""")))
self.assertTrue(msgs[6][0].message.startswith(
textwrap.dedent("""\
Banned imports were used.
BannedActivityTestRule.java:1:""")))
self.assertTrue(msgs[7][0].message.startswith(
self.assertTrue(msgs[5][0].message.startswith(
textwrap.dedent("""\
Banned imports were used.
BannedVectorDrawableCompat.java:1:""")))
Expand Down

0 comments on commit 1d9a90a

Please sign in to comment.