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

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

Issue 1931793002: Stop using nested message loop for alert() and other JS dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated comments and removed unused declaration Created 4 years, 7 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 | « chrome/browser/unload_browsertest.cc ('k') | content/renderer/render_frame_impl.h » ('j') | 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 9b024534c647280c81cba17950ac30c474f67bb5..b1f13c08575d5a860054f159e2fcaf2d4d6f94e4 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
@@ -1168,6 +1168,24 @@ public class ImeTest extends ContentShellTestBase {
}
}
+ // https://crbug.com/604675
+ @MediumTest
+ @Feature({"TextInput"})
+ @CommandLineFlags.Add("enable-features=ImeThread")
+ public void testAlertInKeyUpListenerDoesNotCrash() throws Exception {
+ // Call 'alert()' when 'keyup' event occurs. Since we are in contentshell,
+ // this does not actually pops up the alert window.
+ String code = "(function() { "
+ + "var editor = document.getElementById('input_text');"
+ + "editor.addEventListener('keyup', function(e) { alert('keyup') });"
+ + "})();";
+ JavaScriptUtils.executeJavaScriptAndWaitForResult(
+ getContentViewCore().getWebContents(), code);
+ setComposingText("ab", 1);
+ finishComposingText();
+ assertEquals("ab", getTextBeforeCursor(10, 0));
+ }
+
private void performGo(TestCallbackHelperContainer testCallbackHelperContainer)
throws Throwable {
final InputConnection inputConnection = mConnection;
« no previous file with comments | « chrome/browser/unload_browsertest.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698