diff options
| -rw-r--r-- | packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt index b255b51281af..044332981bf8 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt @@ -57,12 +57,10 @@ fun Kosmos.useUnconfinedTestDispatcher() = apply { testDispatcher = UnconfinedTe var Kosmos.testScope by Fixture { TestScope(testDispatcher) } var Kosmos.backgroundScope by Fixture { testScope.backgroundScope } -var Kosmos.applicationCoroutineScope by Fixture { backgroundScope } +var Kosmos.applicationCoroutineScope by Fixture { testScope.backgroundScope } var Kosmos.testCase: SysuiTestCase by Fixture() -var Kosmos.backgroundCoroutineContext: CoroutineContext by Fixture { - backgroundScope.coroutineContext -} -var Kosmos.mainCoroutineContext: CoroutineContext by Fixture { testScope.coroutineContext } +var Kosmos.backgroundCoroutineContext: CoroutineContext by Fixture { testDispatcher } +var Kosmos.mainCoroutineContext: CoroutineContext by Fixture { testDispatcher } /** * Run this test body with a [Kosmos] as receiver, and using the [testScope] currently installed in |