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

Unified Diff: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/KeyUtils.java

Issue 1206323004: Remove INJECT_EVENTS permissions from test APKs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: don't touch src/mojo Created 5 years, 6 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
Index: content/public/test/android/javatests/src/org/chromium/content/browser/test/util/KeyUtils.java
diff --git a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/KeyUtils.java b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/KeyUtils.java
index 0e90c0d138afb6bbc7bb4a7ddc6840fb9880c5f8..ed7082119b52bb07526fd47565cd52297656b68d 100644
--- a/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/KeyUtils.java
+++ b/content/public/test/android/javatests/src/org/chromium/content/browser/test/util/KeyUtils.java
@@ -23,9 +23,9 @@ public class KeyUtils {
* {@link View#dispatchKeyEventPreIme(KeyEvent)} and {@link View#dispatchKeyEvent(KeyEvent)} of
* the view itself
* <p>
- * The event injecting framework requires INJECT_EVENTS permission and that has been flaky on
- * our perf bots. So until a root cause of the issue can be found, we should use this instead
- * of the functionality provided by {@link #sendKeys(int...)}.
+ * The event injecting framework will fail with a SecurityException if another window is
+ * on top of Chrome ("Injecting to another application requires INJECT_EVENTS permission"). So,
+ * we should use this instead of {@link android.test.InstrumentationTestCase#sendKeys(int...)}.
*
* @param i The application being instrumented.
* @param v The view to receive the key event.
« no previous file with comments | « chrome/android/sync_shell/javatests/AndroidManifest.xml ('k') | content/shell/android/javatests/AndroidManifest.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698