Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/ShellTestCase.java +11 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.platform.test.flag.junit.CheckFlagsRule; import android.platform.test.flag.junit.DeviceFlagsValueProvider; import android.platform.test.flag.junit.SetFlagsRule; import android.testing.TestableContext; import android.testing.TestableLooper; import androidx.test.platform.app.InstrumentationRegistry; Loading Loading @@ -80,6 +81,16 @@ public abstract class ShellTestCase { @After public void shellTearDown() { // In case someone set up a TestableLooper during the test, get rid of it because // TestableLooper intrinsically leaks all past test method member fields in a // big static list. // // TODO (b/261039202): don't use TestableLooper in WmShell tests at all. if (TestableLooper.get(this) != null) { TestableLooper.get(this).processAllMessages(); TestableLooper.remove(this); } InstrumentationRegistry .getInstrumentation() .getUiAutomation() Loading Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/ShellTestCase.java +11 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.platform.test.flag.junit.CheckFlagsRule; import android.platform.test.flag.junit.DeviceFlagsValueProvider; import android.platform.test.flag.junit.SetFlagsRule; import android.testing.TestableContext; import android.testing.TestableLooper; import androidx.test.platform.app.InstrumentationRegistry; Loading Loading @@ -80,6 +81,16 @@ public abstract class ShellTestCase { @After public void shellTearDown() { // In case someone set up a TestableLooper during the test, get rid of it because // TestableLooper intrinsically leaks all past test method member fields in a // big static list. // // TODO (b/261039202): don't use TestableLooper in WmShell tests at all. if (TestableLooper.get(this) != null) { TestableLooper.get(this).processAllMessages(); TestableLooper.remove(this); } InstrumentationRegistry .getInstrumentation() .getUiAutomation() Loading