Loading tests/FlickerTests/src/com/android/server/wm/flicker/helpers/ImeAppHelper.java +4 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.server.wm.flicker.helpers; import static android.os.SystemClock.sleep; import static org.junit.Assert.assertNotNull; import android.app.Instrumentation; import android.support.test.uiautomator.By; import android.support.test.uiautomator.UiDevice; Loading @@ -35,6 +37,8 @@ public class ImeAppHelper extends FlickerAppHelper { public void clickEditTextWidget(UiDevice device) { UiObject2 editText = device.findObject(By.res(getPackage(), "plain_text_input")); assertNotNull("Text field not found, this usually happens when the device was left " + "in an unknown state (e.g. in split screen)", editText); editText.click(); sleep(500); } Loading tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.java +6 −7 Original line number Diff line number Diff line Loading @@ -16,13 +16,14 @@ package com.android.server.wm.flicker.helpers; import static com.android.server.wm.flicker.helpers.AutomationUtils.getPipWindowSelector; import static com.android.server.wm.flicker.helpers.AutomationUtils.hasPipWindow; import static org.junit.Assert.assertNotNull; import android.app.Instrumentation; import android.support.test.uiautomator.By; import android.support.test.uiautomator.UiDevice; import android.support.test.uiautomator.UiObject2; import android.support.test.uiautomator.Until; public class PipAppHelper extends FlickerAppHelper { Loading @@ -32,12 +33,10 @@ public class PipAppHelper extends FlickerAppHelper { public void clickEnterPipButton(UiDevice device) { UiObject2 enterPipButton = device.findObject(By.res(getPackage(), "enter_pip")); assertNotNull("Pip button not found, this usually happens when the device was left " + "in an unknown state (e.g. in split screen)", enterPipButton); enterPipButton.click(); UiObject2 pipWindow = device.wait(Until.findObject(getPipWindowSelector()), sFindTimeout); if (pipWindow == null) { throw new RuntimeException("Unable to find PIP window"); } hasPipWindow(device); } public void closePipWindow(UiDevice device) { Loading Loading
tests/FlickerTests/src/com/android/server/wm/flicker/helpers/ImeAppHelper.java +4 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package com.android.server.wm.flicker.helpers; import static android.os.SystemClock.sleep; import static org.junit.Assert.assertNotNull; import android.app.Instrumentation; import android.support.test.uiautomator.By; import android.support.test.uiautomator.UiDevice; Loading @@ -35,6 +37,8 @@ public class ImeAppHelper extends FlickerAppHelper { public void clickEditTextWidget(UiDevice device) { UiObject2 editText = device.findObject(By.res(getPackage(), "plain_text_input")); assertNotNull("Text field not found, this usually happens when the device was left " + "in an unknown state (e.g. in split screen)", editText); editText.click(); sleep(500); } Loading
tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.java +6 −7 Original line number Diff line number Diff line Loading @@ -16,13 +16,14 @@ package com.android.server.wm.flicker.helpers; import static com.android.server.wm.flicker.helpers.AutomationUtils.getPipWindowSelector; import static com.android.server.wm.flicker.helpers.AutomationUtils.hasPipWindow; import static org.junit.Assert.assertNotNull; import android.app.Instrumentation; import android.support.test.uiautomator.By; import android.support.test.uiautomator.UiDevice; import android.support.test.uiautomator.UiObject2; import android.support.test.uiautomator.Until; public class PipAppHelper extends FlickerAppHelper { Loading @@ -32,12 +33,10 @@ public class PipAppHelper extends FlickerAppHelper { public void clickEnterPipButton(UiDevice device) { UiObject2 enterPipButton = device.findObject(By.res(getPackage(), "enter_pip")); assertNotNull("Pip button not found, this usually happens when the device was left " + "in an unknown state (e.g. in split screen)", enterPipButton); enterPipButton.click(); UiObject2 pipWindow = device.wait(Until.findObject(getPipWindowSelector()), sFindTimeout); if (pipWindow == null) { throw new RuntimeException("Unable to find PIP window"); } hasPipWindow(device); } public void closePipWindow(UiDevice device) { Loading