From 90d3bdc22f7826554dc0221f08bcc035bc7d9e54 Mon Sep 17 00:00:00 2001 From: newt Date: Tue, 30 Jun 2015 17:37:34 -0700 Subject: [PATCH] Remove INJECT_EVENTS permissions from test APKs. This permission only applies to system apps, so the test APKs couldn't actually use the permission. BUG=502028 Review URL: https://codereview.chromium.org/1206323004 Cr-Commit-Position: refs/heads/master@{#336938} --- build/android/lint/suppressions.xml | 2 -- chrome/android/javatests/AndroidManifest.xml | 1 - chrome/android/shell/javatests/AndroidManifest.xml | 1 - chrome/android/sync_shell/javatests/AndroidManifest.xml | 1 - .../src/org/chromium/content/browser/test/util/KeyUtils.java | 6 +++--- content/shell/android/javatests/AndroidManifest.xml | 1 - 6 files changed, 3 insertions(+), 9 deletions(-) diff --git a/build/android/lint/suppressions.xml b/build/android/lint/suppressions.xml index dcd067e38bf2..e44faef7f62a 100644 --- a/build/android/lint/suppressions.xml +++ b/build/android/lint/suppressions.xml @@ -83,8 +83,6 @@ Still reading? - - diff --git a/chrome/android/javatests/AndroidManifest.xml b/chrome/android/javatests/AndroidManifest.xml index 56d1c3dfadad..5030386ab399 100644 --- a/chrome/android/javatests/AndroidManifest.xml +++ b/chrome/android/javatests/AndroidManifest.xml @@ -8,7 +8,6 @@ package="org.chromium.chrome.tests"> - diff --git a/chrome/android/shell/javatests/AndroidManifest.xml b/chrome/android/shell/javatests/AndroidManifest.xml index 6613614db1ac..aa256a18a3de 100644 --- a/chrome/android/shell/javatests/AndroidManifest.xml +++ b/chrome/android/shell/javatests/AndroidManifest.xml @@ -8,7 +8,6 @@ package="org.chromium.chrome.shell.tests"> - diff --git a/chrome/android/sync_shell/javatests/AndroidManifest.xml b/chrome/android/sync_shell/javatests/AndroidManifest.xml index 848701973e97..2b063ec1e40c 100644 --- a/chrome/android/sync_shell/javatests/AndroidManifest.xml +++ b/chrome/android/sync_shell/javatests/AndroidManifest.xml @@ -8,7 +8,6 @@ package="org.chromium.chrome.sync_shell.tests"> - 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 0e90c0d138af..ed7082119b52 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 *

- * 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. diff --git a/content/shell/android/javatests/AndroidManifest.xml b/content/shell/android/javatests/AndroidManifest.xml index 30dfdb5cd966..4e64c45b58cf 100644 --- a/content/shell/android/javatests/AndroidManifest.xml +++ b/content/shell/android/javatests/AndroidManifest.xml @@ -8,7 +8,6 @@ package="org.chromium.content_shell_apk.tests"> - -- 2.11.4.GIT