[Android] Use PACKAGE_INFO constant from catapult/

The PACKAGE_INFO constant is duplicated between Chromium and
catapult. Grabbing the PACKAGE_INFO from catapult so we only need
to maintain 1 copy.

This needs to be landed after https://codereview.chromium.org/2080883002
which updates the constants in catapult.

BUG=

Review-Url: https://codereview.chromium.org/2086623002
Cr-Original-Commit-Position: refs/heads/master@{#403534}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d41bc3a91a482737e6fe59d85b644ae471566d4c
This commit is contained in:
mikecase 2016-07-01 14:20:56 -07:00 коммит произвёл Commit bot
Родитель d33472928c
Коммит 76d9f8b4fc
2 изменённых файлов: 12 добавлений и 57 удалений

Просмотреть файл

@ -15,6 +15,7 @@ import os
import subprocess
import devil.android.sdk.keyevent
from devil.android.constants import chrome
from devil.android.sdk import version_codes
from devil.constants import exit_codes
@ -26,92 +27,45 @@ DIR_SOURCE_ROOT = os.environ.get('CHECKOUT_SOURCE_ROOT',
os.path.abspath(os.path.join(os.path.dirname(__file__),
os.pardir, os.pardir, os.pardir, os.pardir)))
PackageInfo = collections.namedtuple('PackageInfo',
['package', 'activity', 'cmdline_file', 'devtools_socket'])
PACKAGE_INFO = {
'chrome_document': PackageInfo(
'com.google.android.apps.chrome.document',
'com.google.android.apps.chrome.document.ChromeLauncherActivity',
'/data/local/chrome-command-line',
'chrome_devtools_remote'),
'chrome': PackageInfo(
'com.google.android.apps.chrome',
'com.google.android.apps.chrome.Main',
'/data/local/chrome-command-line',
'chrome_devtools_remote'),
'chrome_beta': PackageInfo(
'com.chrome.beta',
'com.google.android.apps.chrome.Main',
'/data/local/chrome-command-line',
'chrome_devtools_remote'),
'chrome_stable': PackageInfo(
'com.android.chrome',
'com.google.android.apps.chrome.Main',
'/data/local/chrome-command-line',
'chrome_devtools_remote'),
'chrome_dev': PackageInfo(
'com.chrome.dev',
'com.google.android.apps.chrome.Main',
'/data/local/chrome-command-line',
'chrome_devtools_remote'),
'chrome_canary': PackageInfo(
'com.chrome.canary',
'com.google.android.apps.chrome.Main',
'/data/local/chrome-command-line',
'chrome_devtools_remote'),
'chrome_work': PackageInfo(
'com.chrome.work',
'com.google.android.apps.chrome.Main',
'/data/local/chrome-command-line',
'chrome_devtools_remote'),
'chromium': PackageInfo(
'org.chromium.chrome',
'com.google.android.apps.chrome.Main',
'/data/local/chrome-command-line',
'chrome_devtools_remote'),
'legacy_browser': PackageInfo(
PACKAGE_INFO = dict(chrome.PACKAGE_INFO)
PACKAGE_INFO.update({
'legacy_browser': chrome.PackageInfo(
'com.google.android.browser',
'com.android.browser.BrowserActivity',
None,
None),
'chromecast_shell': PackageInfo(
'chromecast_shell': chrome.PackageInfo(
'com.google.android.apps.mediashell',
'com.google.android.apps.mediashell.MediaShellActivity',
'/data/local/tmp/castshell-command-line',
None),
'content_shell': PackageInfo(
'org.chromium.content_shell_apk',
'org.chromium.content_shell_apk.ContentShellActivity',
'/data/local/tmp/content-shell-command-line',
None),
'android_webview_shell': PackageInfo(
'android_webview_shell': chrome.PackageInfo(
'org.chromium.android_webview.shell',
'org.chromium.android_webview.shell.AwShellActivity',
'/data/local/tmp/android-webview-command-line',
None),
'gtest': PackageInfo(
'gtest': chrome.PackageInfo(
'org.chromium.native_test',
'org.chromium.native_test.NativeUnitTestActivity',
'/data/local/tmp/chrome-native-tests-command-line',
None),
'components_browsertests': PackageInfo(
'components_browsertests': chrome.PackageInfo(
'org.chromium.components_browsertests_apk',
('org.chromium.components_browsertests_apk' +
'.ComponentsBrowserTestsActivity'),
'/data/local/tmp/chrome-native-tests-command-line',
None),
'content_browsertests': PackageInfo(
'content_browsertests': chrome.PackageInfo(
'org.chromium.content_browsertests_apk',
'org.chromium.content_browsertests_apk.ContentBrowserTestsActivity',
'/data/local/tmp/chrome-native-tests-command-line',
None),
'chromedriver_webview_shell': PackageInfo(
'chromedriver_webview_shell': chrome.PackageInfo(
'org.chromium.chromedriver_webview_shell',
'org.chromium.chromedriver_webview_shell.Main',
None,
None),
}
})
# Ports arrangement for various test servers used in Chrome for Android.

Просмотреть файл

@ -22,6 +22,7 @@
../../third_party/catapult/devil/devil/android/apk_helper.py
../../third_party/catapult/devil/devil/android/battery_utils.py
../../third_party/catapult/devil/devil/android/constants/__init__.py
../../third_party/catapult/devil/devil/android/constants/chrome.py
../../third_party/catapult/devil/devil/android/constants/file_system.py
../../third_party/catapult/devil/devil/android/decorators.py
../../third_party/catapult/devil/devil/android/device_blacklist.py