Make ChromeBrowserTestsActivity inherit from ChromeTabbedActivity

We want android_browsertests to run a full Chromium browser. The piece
of Java code that owns the various top level UI is the
ChromeTabbedActivity, so we want to use that. We make our test activity
inherit from that, and thus instantiate its own NativeTest and run it
when Chromium Java startup is complete.

We copy a number of services and activities over from the Chromium
AndroidManifest.xml which are referred to during initialization and
cause exceptions to be thrown when not present. Long-term we should
merge the browser test activity into the main Chromium manifest file
and optionally use it when building android_browsertests.

We add some dependencies for various pieces needed to run a full
Chromium browser, that fail to load at runtime otherwise.

We remove the initChromiumBrowserProcessForTests() method which is
now unused as browser tests inject a replacement for ContentMain()
but otherwise use the regular startup paths.

We also remove the handlePostNativeStartupSynchronously() paths as
they are not used anymore. This is done as part of pumping the Java
startup tasks.

Bug: 961849
Change-Id: I4c59c450c2ad2da39473331e82a3f4959f33897c
Reviewed-by: John Budorick <>
Reviewed-by: Ted Choc <>
Commit-Queue: danakj <>
Cr-Commit-Position: refs/heads/master@{#672263}
12 files changed