Loading tests/src/com/android/launcher3/AbstractDeviceProfileTest.kt +5 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import android.content.Context import android.content.res.Configuration import android.graphics.Point import android.graphics.Rect import android.platform.test.flag.junit.SetFlagsRule import android.platform.test.rule.AllowedDevices import android.platform.test.rule.DeviceProduct import android.platform.test.rule.IgnoreLimit Loading @@ -33,6 +34,7 @@ import com.android.launcher3.util.MainThreadInitializedObject.SandboxContext import com.android.launcher3.util.NavigationMode import com.android.launcher3.util.WindowBounds import com.android.launcher3.util.rule.TestStabilityRule import com.android.launcher3.util.rule.setFlags import com.android.launcher3.util.window.CachedDisplayInfo import com.android.launcher3.util.window.WindowManagerProxy import com.google.common.truth.Truth Loading Loading @@ -64,6 +66,8 @@ abstract class AbstractDeviceProfileTest { private val windowManagerProxy: WindowManagerProxy = mock() private val launcherPrefs: LauncherPrefs = mock() @get:Rule val setFlagsRule = SetFlagsRule(SetFlagsRule.DefaultInitValueType.DEVICE_DEFAULT) @Rule @JvmField val testStabilityRule = TestStabilityRule() @Rule @JvmField val limitDevicesRule = LimitDevicesRule() Loading Loading @@ -270,6 +274,7 @@ abstract class AbstractDeviceProfileTest { isGestureMode: Boolean = true, densityDpi: Int ) { setFlagsRule.setFlags(false, Flags.FLAG_ENABLE_TWOLINE_TOGGLE) val windowsBounds = perDisplayBoundsCache[displayInfo]!! val realBounds = windowsBounds[rotation] whenever(windowManagerProxy.getDisplayInfo(any())).thenReturn(displayInfo) Loading tests/src/com/android/launcher3/ui/BubbleTextViewTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ public class BubbleTextViewTest { public void setUp() throws Exception { MockitoAnnotations.initMocks(this); Utilities.enableRunningInTestHarnessForTests(); mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_TWOLINE_TOGGLE); mContext = new ActivityContextWrapper(getApplicationContext()); mBubbleTextView = new BubbleTextView(mContext); mBubbleTextView.reset(); Loading Loading
tests/src/com/android/launcher3/AbstractDeviceProfileTest.kt +5 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import android.content.Context import android.content.res.Configuration import android.graphics.Point import android.graphics.Rect import android.platform.test.flag.junit.SetFlagsRule import android.platform.test.rule.AllowedDevices import android.platform.test.rule.DeviceProduct import android.platform.test.rule.IgnoreLimit Loading @@ -33,6 +34,7 @@ import com.android.launcher3.util.MainThreadInitializedObject.SandboxContext import com.android.launcher3.util.NavigationMode import com.android.launcher3.util.WindowBounds import com.android.launcher3.util.rule.TestStabilityRule import com.android.launcher3.util.rule.setFlags import com.android.launcher3.util.window.CachedDisplayInfo import com.android.launcher3.util.window.WindowManagerProxy import com.google.common.truth.Truth Loading Loading @@ -64,6 +66,8 @@ abstract class AbstractDeviceProfileTest { private val windowManagerProxy: WindowManagerProxy = mock() private val launcherPrefs: LauncherPrefs = mock() @get:Rule val setFlagsRule = SetFlagsRule(SetFlagsRule.DefaultInitValueType.DEVICE_DEFAULT) @Rule @JvmField val testStabilityRule = TestStabilityRule() @Rule @JvmField val limitDevicesRule = LimitDevicesRule() Loading Loading @@ -270,6 +274,7 @@ abstract class AbstractDeviceProfileTest { isGestureMode: Boolean = true, densityDpi: Int ) { setFlagsRule.setFlags(false, Flags.FLAG_ENABLE_TWOLINE_TOGGLE) val windowsBounds = perDisplayBoundsCache[displayInfo]!! val realBounds = windowsBounds[rotation] whenever(windowManagerProxy.getDisplayInfo(any())).thenReturn(displayInfo) Loading
tests/src/com/android/launcher3/ui/BubbleTextViewTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ public class BubbleTextViewTest { public void setUp() throws Exception { MockitoAnnotations.initMocks(this); Utilities.enableRunningInTestHarnessForTests(); mSetFlagsRule.disableFlags(Flags.FLAG_ENABLE_TWOLINE_TOGGLE); mContext = new ActivityContextWrapper(getApplicationContext()); mBubbleTextView = new BubbleTextView(mContext); mBubbleTextView.reset(); Loading