• danakj's avatar
    Add a java skeleton for running chrome browser tests on Android. · b793785e
    danakj authored
    This adds a ChromeBrowserTests java activity and application, based on
    content and components browser tests. It additionally sets up a
    ChromeBrowserInitializer which is needed before running the native
    setup of ChromeBrowserMainParts etc.
    
    The JNI_Onload runs the Chrome Android production path to set up a
    ContentShellDelegate, and unsets the product version number afterward
    as tests do no expect to have a version number.
    
    The test_activity.xml layout refers to a ShellManager as the java
    pieces are setting up the same UI as content-based browser tests for
    now. We will need to use more Chrome java pieces for the UI in order
    for tests to call out to java probably. But this gives a baseline
    framework that runs the //chrome C++ code in an Android browser test.
    
    We still need a BrowserTestBase subclass to provide the Test class
    so that we may begin writing browser tests on Android.
    
    We standardize the java code for content and components browser tests
    while writing the ChromeBrowserTestsApplication, based on the code
    in ChromeApplication and NativeUnitTest.
    
    In order to depend on NestedMessagePumpAndroid in browser tests, but
    not depend on WebTestSupport, we split the web_test_support target into
    two parts, and we depend on the NestedMessagePumpAndroid in each place
    it is used directly, which are the onload.cc files for each android
    browser test target. We remove dependencies on web_test_support from
    everywhere but content_shell_lib, where it is used.
    
    R=jam@chromium.org
    
    Bug: 961849
    Change-Id: I4212482849eaf52dc8b8c22070806572215a8905
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1633212
    Commit-Queue: danakj <danakj@chromium.org>
    Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
    Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#665950}
    b793785e
BUILD.gn 313 KB