Loading packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractorTest.kt +6 −6 Original line number Diff line number Diff line Loading @@ -204,7 +204,7 @@ class InternetTileDataInteractorTest : SysuiTestCase() { val actualIcon = latest?.icon assertThat(actualIcon).isEqualTo(expectedIcon) assertThat(latest?.iconId).isNull() assertThat(latest?.iconId).isEqualTo(WifiIcons.WIFI_NO_INTERNET_ICONS[4]) assertThat(latest?.contentDescription.loadContentDescription(context)) .isEqualTo("$internet,test ssid") val expectedSd = wifiIcon.contentDescription Loading Loading @@ -443,15 +443,15 @@ class InternetTileDataInteractorTest : SysuiTestCase() { * on the mentioned context. Since that context does not have a looper assigned to it, the * handler instantiation will throw a RuntimeException. * * TODO(b/338068066): Robolectric behavior differs in that it does not throw the exception * So either we should make Robolectric behvase similar to the device test, or change this * test to look for a different signal than the exception, when run by Robolectric. For now * we just assume the test is not Robolectric. * TODO(b/338068066): Robolectric behavior differs in that it does not throw the exception So * either we should make Robolectric behave similar to the device test, or change this test to * look for a different signal than the exception, when run by Robolectric. For now we just * assume the test is not Robolectric. */ @Test(expected = java.lang.RuntimeException::class) fun mobileDefault_usesNetworkNameAndIcon_throwsRunTimeException() = testScope.runTest { assumeFalse(isRobolectricTest()); assumeFalse(isRobolectricTest()) collectLastValue(underTest.tileData(testUser, flowOf(DataUpdateTrigger.InitialRequest))) Loading packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractor.kt +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ constructor( flowOf( InternetTileModel.Active( secondaryTitle = secondary, iconId = wifiIcon.icon.res, icon = Icon.Loaded(context.getDrawable(wifiIcon.icon.res)!!, null), stateDescription = wifiIcon.contentDescription, contentDescription = ContentDescription.Loaded("$internetLabel,$secondary"), Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractorTest.kt +6 −6 Original line number Diff line number Diff line Loading @@ -204,7 +204,7 @@ class InternetTileDataInteractorTest : SysuiTestCase() { val actualIcon = latest?.icon assertThat(actualIcon).isEqualTo(expectedIcon) assertThat(latest?.iconId).isNull() assertThat(latest?.iconId).isEqualTo(WifiIcons.WIFI_NO_INTERNET_ICONS[4]) assertThat(latest?.contentDescription.loadContentDescription(context)) .isEqualTo("$internet,test ssid") val expectedSd = wifiIcon.contentDescription Loading Loading @@ -443,15 +443,15 @@ class InternetTileDataInteractorTest : SysuiTestCase() { * on the mentioned context. Since that context does not have a looper assigned to it, the * handler instantiation will throw a RuntimeException. * * TODO(b/338068066): Robolectric behavior differs in that it does not throw the exception * So either we should make Robolectric behvase similar to the device test, or change this * test to look for a different signal than the exception, when run by Robolectric. For now * we just assume the test is not Robolectric. * TODO(b/338068066): Robolectric behavior differs in that it does not throw the exception So * either we should make Robolectric behave similar to the device test, or change this test to * look for a different signal than the exception, when run by Robolectric. For now we just * assume the test is not Robolectric. */ @Test(expected = java.lang.RuntimeException::class) fun mobileDefault_usesNetworkNameAndIcon_throwsRunTimeException() = testScope.runTest { assumeFalse(isRobolectricTest()); assumeFalse(isRobolectricTest()) collectLastValue(underTest.tileData(testUser, flowOf(DataUpdateTrigger.InitialRequest))) Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/impl/internet/domain/interactor/InternetTileDataInteractor.kt +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ constructor( flowOf( InternetTileModel.Active( secondaryTitle = secondary, iconId = wifiIcon.icon.res, icon = Icon.Loaded(context.getDrawable(wifiIcon.icon.res)!!, null), stateDescription = wifiIcon.contentDescription, contentDescription = ContentDescription.Loaded("$internetLabel,$secondary"), Loading