summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Felipe Leme <felipeal@google.com> 2015-12-14 03:34:10 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2015-12-14 03:34:10 +0000
commit2d76c84cf42d5c095adefffa3b3c5e2c5b881bed (patch)
treef994e13feb08f1afc4be10eae0bcfdc9cfc67554
parentf420eb110675705833cc473a0d89f141b96ec21d (diff)
parentfb7b4a5bf1bdb9126366b10f9bbbb9c7e651ba70 (diff)
Merge "Fixed ActivityChooser logic for the initial case."
-rw-r--r--packages/Shell/tests/src/com/android/shell/UiBot.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/packages/Shell/tests/src/com/android/shell/UiBot.java b/packages/Shell/tests/src/com/android/shell/UiBot.java
index 7d3713724e76..c87172720ad7 100644
--- a/packages/Shell/tests/src/com/android/shell/UiBot.java
+++ b/packages/Shell/tests/src/com/android/shell/UiBot.java
@@ -124,6 +124,16 @@ final class UiBot {
if (gotIt) {
Log.v(TAG, "Found activity " + name + ", it's the default action");
+ // Clicks the "Just Once" button.
+ gotIt = mDevice
+ .wait(Until.hasObject(By.res("android", "button_once")), mTimeout);
+ assertTrue("'Just Once' button not visible yet", gotIt);
+
+ UiObject justOnce = mDevice
+ .findObject(new UiSelector().resourceId("android:id/button_once"));
+ assertTrue("'Just Once' button not found", justOnce.exists());
+
+ click(justOnce, "Just Once");
} else {
// Since it's not, need to find it in the scrollable list...
Log.v(TAG, "Activity " + name + " is not default action");
@@ -140,16 +150,5 @@ final class UiBot {
// ... then select it.
click(activity, name);
}
-
- // Then clicks the "Just Once" button.
- gotIt = mDevice
- .wait(Until.hasObject(By.res("android", "button_once")), mTimeout);
- assertTrue("'Just Once' button not visible yet", gotIt);
-
- UiObject justOnce = mDevice
- .findObject(new UiSelector().resourceId("android:id/button_once"));
- assertTrue("'Just Once' button not found", justOnce.exists());
-
- click(justOnce, "Just Once");
}
}