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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java

Issue 2170753002: Fix flaky content.browser.input.ImeTest#testPasteLongText. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change the comment Created 4 years, 5 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: content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
index 3a422176f6bc7d7761812ef566fc378d2f5fecc3..0572ab55c0fb3957415201f921d60aee3ab89d99 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
@@ -24,7 +24,6 @@ import android.view.inputmethod.InputConnection;
import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.Feature;
-import org.chromium.base.test.util.FlakyTest;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.test.util.Criteria;
import org.chromium.content.browser.test.util.CriteriaHelper;
@@ -627,7 +626,6 @@ public class ImeTest extends ContentShellTestBase {
@CommandLineFlags.Add("enable-features=ImeThread")
@MediumTest
@Feature({"TextInput"})
- @FlakyTest
public void testPasteLongText() throws Exception {
int textLength = 25000;
String text = new String(new char[textLength]).replace("\0", "a");
@@ -637,6 +635,7 @@ public class ImeTest extends ContentShellTestBase {
selectAll();
waitAndVerifyUpdateSelection(1, 0, textLength, -1, -1);
copy();
+ assertClipboardContents(getActivity(), text);
focusElement("textarea");
waitAndVerifyUpdateSelection(2, 0, 0, -1, -1);
@@ -1435,6 +1434,8 @@ public class ImeTest extends ContentShellTestBase {
});
}
+ // After calling this method, we should call assertClipboardContents() to wait for the clipboard
+ // to get updated. See cubug.com/621046
private void copy() {
final WebContents webContents = mWebContents;
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
« 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