• danakj's avatar
    Make PaymentRequestCanMakePayment browser tests run on Android. · 7366f7ef
    danakj authored
    This moves them out of ui/views/ since they aren't related, breaks
    their dependency on the ui/views/ test base class, copying over the
    bits needed for these tests, and adding OS_ANDROID support for anything
    platform specific to use the Java PaymentRequest implementation on
    Android.
    
    This puts common test code in helpers under the :test_support target
    in chrome/test/payments/, with both _desktop.cc and _android.cc
    implementations of the helper class. Non-payment helpers go in
    chrome/test/base/ and currently just depend on #ifdefs to separate
    desktop and Android code since the differences are small. The
    chrome_test_utils:: namespace is used for helpers that support Android
    and desktop, as opposed to the ui_test_utils:: namespace designed for
    desktop only.
    
    JNI bridges go under chrome/test/payments/android/ and are also part of
    the :test_support target so they may be used by the above helpers.
    
    And Java helper classes go under chrome/test/android/test_support/ in
    the org.chromium.chrome.test_support name space. They are in a
    :test_support_java target, which should be depended on alongside
    :test_support for including the Java classes into the target so that
    the JNI bridges can find the Java implementations.
    
    The JNI header generation for the Java classes are in the
    :test_support_jni_headers target, which is depended on by :test_support
    in order for the JNI bridges to include and use them.
    
    The test harness subclass inherits from PlatformBrowserTest to give an
    Android vs desktop outcome, but otherwise depends on the helper objects
    to provide Android vs desktop behaviour.
    
    R=rouslan@chromium.org
    
    Bug: 961849
    Change-Id: Ie5ffda4d0206ae2a1f28ef3156cef183e56ee163
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1682764
    Commit-Queue: danakj <danakj@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Reviewed-by: default avatarRouslan Solomakhin <rouslan@chromium.org>
    Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#675730}
    7366f7ef
payment_request_test_controller.h 2.36 KB