Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2464)

Unified Diff: android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/ActionModeTest.java

Issue 2745893002: Wait for popup animation using idling resource for ActionMode Tests (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/ActionModeTest.java
diff --git a/android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/ActionModeTest.java b/android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/ActionModeTest.java
index ffbcca96510b6e2c411daaf5c329f23b8fa8e2d8..eb9dc56bc4b389020ff62243c9584f0ffb4e2378 100644
--- a/android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/ActionModeTest.java
+++ b/android_webview/tools/automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/ActionModeTest.java
@@ -94,7 +94,7 @@ public class ActionModeTest {
private static final String MORE_OPTIONS_ACTION = "More options";
private static final String PASTE_ACTION = "Paste";
private static final String SHARE_ACTION = "Share";
- private static final String SELECT_ALL_ACTION = "Select All";
+ private static final String SELECT_ALL_ACTION = "Select all";
private static final String WEB_SEARCH_ACTION = "Web search";
private static final String QUICK_SEARCH_BOX_PKG = "com.google.android.googlequicksearchbox";
@@ -147,7 +147,7 @@ public class ActionModeTest {
@UseLayout("edittext_webview")
public void testSelectAll() {
longClickOnLastWord(R.id.webview);
- clickPopupAction("Select all");
+ clickPopupAction(SELECT_ALL_ACTION);
clickPopupAction(COPY_ACTION);
longClickOnLastWord(R.id.edittext);
clickPopupAction(PASTE_ACTION);
@@ -246,6 +246,14 @@ public class ActionModeTest {
.perform(click());
onData(new MenuItemMatcher(equalTo(name))).inRoot(rootMatcher).perform(click());
}
+
+ /**
+ * After select all action is clicked, the PopUp Menu may disappear
+ * briefly due to selection change, wait for the menu to reappear
+ */
+ if (name.equals(SELECT_ALL_ACTION)) {
+ mActionBarIdlingResource.start();
+ }
}
/**
@@ -286,11 +294,6 @@ public class ActionModeTest {
private boolean mActionStarting;
private ResourceCallback mResourceCallback;
- ActionBarIdlingResource() {
- mActionStarting = false;
- mResourceCallback = null;
- }
-
@Override
public String getName() {
return "ActionBarIdlingResource";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698