summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn1
-rw-r--r--build/all.gyp1
-rw-r--r--build/gn_migration.gypi1
-rw-r--r--tools/android/BUILD.gn8
-rw-r--r--tools/android/android_tools.gyp8
-rw-r--r--tools/android/push_apps_to_background/AndroidManifest.xml29
-rw-r--r--tools/android/push_apps_to_background/BUILD.gn23
-rw-r--r--tools/android/push_apps_to_background/OWNERS2
-rw-r--r--tools/android/push_apps_to_background/push_apps_to_background.gyp21
-rw-r--r--tools/android/push_apps_to_background/res/drawable-mdpi/ic_launcher.pngbin0 -> 9397 bytes
-rw-r--r--tools/android/push_apps_to_background/res/layout/activity_push_apps_to_background.xml19
-rw-r--r--tools/android/push_apps_to_background/res/values/strings.xml15
-rw-r--r--tools/android/push_apps_to_background/src/org/chromium/push_apps_to_background/PushAppsToBackgroundActivity.java21
13 files changed, 149 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 579eb72..26e7857 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -282,6 +282,7 @@ group("both_gn_and_gyp") {
"//third_party/smhasher:murmurhash3",
"//tools/android:android_tools",
"//tools/android:memconsumer",
+ "//tools/android:push_apps_to_background",
"//tools/android/heap_profiler:heap_profiler_unittests",
"//tools/android/kerberos/SpnegoAuthenticator:spnego_authenticator_apk",
"//tools/cygprofile:cygprofile_unittests",
diff --git a/build/all.gyp b/build/all.gyp
index 8f5e701..4d2fe4f 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -834,6 +834,7 @@
'../third_party/WebKit/public/all.gyp:*',
'../tools/android/android_tools.gyp:android_tools',
'../tools/android/android_tools.gyp:memconsumer',
+ '../tools/android/android_tools.gyp:push_apps_to_background',
'../tools/android/findbugs_plugin/findbugs_plugin.gyp:findbugs_plugin_test',
'../tools/cygprofile/cygprofile.gyp:cygprofile_unittests',
'../ui/android/ui_android.gyp:ui_android_unittests',
diff --git a/build/gn_migration.gypi b/build/gn_migration.gypi
index 3a4e4b5..ef543ea 100644
--- a/build/gn_migration.gypi
+++ b/build/gn_migration.gypi
@@ -233,6 +233,7 @@
'../third_party/WebKit/Source/wtf/wtf_tests.gyp:wtf_unittests_apk',
'../tools/android/heap_profiler/heap_profiler.gyp:heap_profiler_unittests_apk',
'../tools/android/android_tools.gyp:memconsumer',
+ '../tools/android/android_tools.gyp:push_apps_to_background',
'../tools/imagediff/image_diff.gyp:image_diff#host',
'../third_party/catapult/telemetry/telemetry.gyp:bitmaptools#host',
'../ui/android/ui_android.gyp:ui_android_unittests_apk',
diff --git a/tools/android/BUILD.gn b/tools/android/BUILD.gn
index bcadd0f..99f9a01 100644
--- a/tools/android/BUILD.gn
+++ b/tools/android/BUILD.gn
@@ -79,3 +79,11 @@ group("audio_focus_grabber") {
"//tools/android/audio_focus_grabber:audio_focus_grabber_apk",
]
}
+
+# GYP: //tools/android/android_tools.gyp:push_apps_to_background
+group("push_apps_to_background") {
+ testonly = true
+ deps = [
+ "//tools/android/push_apps_to_background:push_apps_to_background_apk",
+ ]
+}
diff --git a/tools/android/android_tools.gyp b/tools/android/android_tools.gyp
index 065c804..3e1589f 100644
--- a/tools/android/android_tools.gyp
+++ b/tools/android/android_tools.gyp
@@ -85,5 +85,13 @@
'audio_focus_grabber/audio_focus_grabber.gyp:audio_focus_grabber_apk',
],
},
+ {
+ # GN: //tools/android:push_apps_to_background
+ 'target_name': 'push_apps_to_background',
+ 'type': 'none',
+ 'dependencies': [
+ 'push_apps_to_background/push_apps_to_background.gyp:push_apps_to_background_apk',
+ ],
+ },
],
}
diff --git a/tools/android/push_apps_to_background/AndroidManifest.xml b/tools/android/push_apps_to_background/AndroidManifest.xml
new file mode 100644
index 0000000..92753f3
--- /dev/null
+++ b/tools/android/push_apps_to_background/AndroidManifest.xml
@@ -0,0 +1,29 @@
+<!--
+ * Copyright 2016 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+-->
+
+<manifest
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ package="org.chromium.push_apps_to_background"
+ android:versionCode="1"
+ android:versionName="1.0" >
+
+ <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23" />
+
+ <application
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name"
+ android:theme="@android:style/Theme.Light" >
+ <activity
+ android:name="org.chromium.push_apps_to_background.PushAppsToBackgroundActivity"
+ android:label="@string/title_activity_push_apps_to_background"
+ android:exported="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest> \ No newline at end of file
diff --git a/tools/android/push_apps_to_background/BUILD.gn b/tools/android/push_apps_to_background/BUILD.gn
new file mode 100644
index 0000000..cd90aa3
--- /dev/null
+++ b/tools/android/push_apps_to_background/BUILD.gn
@@ -0,0 +1,23 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/android/rules.gni")
+import("//testing/test.gni")
+
+# Mark all targets as test only.
+testonly = true
+
+android_apk("push_apps_to_background_apk") {
+ apk_name = "PushAppsToBackground"
+ java_files = [ "src/org/chromium/push_apps_to_background/PushAppsToBackgroundActivity.java" ]
+ android_manifest = "AndroidManifest.xml"
+ deps = [
+ ":push_apps_to_background_apk_resources",
+ ]
+}
+
+android_resources("push_apps_to_background_apk_resources") {
+ resource_dirs = [ "res" ]
+ custom_package = "org.chromium.push_apps_to_background"
+}
diff --git a/tools/android/push_apps_to_background/OWNERS b/tools/android/push_apps_to_background/OWNERS
new file mode 100644
index 0000000..56fcbb8
--- /dev/null
+++ b/tools/android/push_apps_to_background/OWNERS
@@ -0,0 +1,2 @@
+mikecase@chromium.org
+perezju@chromium.org \ No newline at end of file
diff --git a/tools/android/push_apps_to_background/push_apps_to_background.gyp b/tools/android/push_apps_to_background/push_apps_to_background.gyp
new file mode 100644
index 0000000..25fca1f
--- /dev/null
+++ b/tools/android/push_apps_to_background/push_apps_to_background.gyp
@@ -0,0 +1,21 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+{
+ 'targets': [
+ # GN: //tools/android/push_apps_to_background:push_apps_to_background_apk
+ {
+ 'target_name': 'push_apps_to_background_apk',
+ 'type': 'none',
+ 'variables': {
+ 'apk_name': 'PushAppsToBackground',
+ 'java_in_dir': '.',
+ 'resource_dir': 'res',
+ 'android_manifest_path': 'AndroidManifest.xml',
+ },
+ 'includes': [
+ '../../../build/java_apk.gypi',
+ ],
+ },
+ ],
+}
diff --git a/tools/android/push_apps_to_background/res/drawable-mdpi/ic_launcher.png b/tools/android/push_apps_to_background/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..96a442e
--- /dev/null
+++ b/tools/android/push_apps_to_background/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/tools/android/push_apps_to_background/res/layout/activity_push_apps_to_background.xml b/tools/android/push_apps_to_background/res/layout/activity_push_apps_to_background.xml
new file mode 100644
index 0000000..9d292ca
--- /dev/null
+++ b/tools/android/push_apps_to_background/res/layout/activity_push_apps_to_background.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2016 The Chromium Authors. All rights reserved.
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:gravity="center">
+ <TextView
+ android:id="@+id/text_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:text="@string/push_apps_to_background_message" />
+</LinearLayout> \ No newline at end of file
diff --git a/tools/android/push_apps_to_background/res/values/strings.xml b/tools/android/push_apps_to_background/res/values/strings.xml
new file mode 100644
index 0000000..99f76a2
--- /dev/null
+++ b/tools/android/push_apps_to_background/res/values/strings.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2016 The Chromium Authors. All rights reserved.
+ Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+-->
+
+<resources>
+ <string name="app_name">Push Apps To Background</string>
+ <string name="push_apps_to_background_message">
+ "<b>What is my purpose?</b>\n
+ <i>You push apps to the background.</i>\n
+ <b>Oh my God</b>."
+ </string>
+ <string name="title_activity_push_apps_to_background">Push Apps To Background</string>
+</resources> \ No newline at end of file
diff --git a/tools/android/push_apps_to_background/src/org/chromium/push_apps_to_background/PushAppsToBackgroundActivity.java b/tools/android/push_apps_to_background/src/org/chromium/push_apps_to_background/PushAppsToBackgroundActivity.java
new file mode 100644
index 0000000..95e9a99
--- /dev/null
+++ b/tools/android/push_apps_to_background/src/org/chromium/push_apps_to_background/PushAppsToBackgroundActivity.java
@@ -0,0 +1,21 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.push_apps_to_background;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+/**
+ * This activity is used in performance tests to push other apps
+ * to the background while running automated user stories.
+ */
+public class PushAppsToBackgroundActivity extends Activity {
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_push_apps_to_background);
+ }
+} \ No newline at end of file