Commit 501e678d authored by Rouslan Solomakhin's avatar Rouslan Solomakhin Committed by Commit Bot

[Web Payment] Disable minimal UI confirm test on Android L.

Before this patch, "Lollipop Phone Tester" bot running on Nexus 5 timed
out while firing the "paymentrequest" event as seen in the error log
attached to the https://crbug.com/1061574.

This patch disables the minimal UI confirm test on Android L.

After this patch, the minimal UI confirm test passes on Android P and K
bots, Android Q Pixel 3 local physical device, and Android K emulator.
The test also passes on desktop, but that's because Chrome on desktop
triggers a skip-UI flow and the payment handler returns the response
without showing its own UI.

Bug: 1061574
Change-Id: I7be60e761061285170efdcdb30a3f562133e6530
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2105774Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Reviewed-by: default avatarSahel Sharify <sahel@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751143}
parent d696c208
......@@ -80,10 +80,10 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestMinimalUITest, HasEnrolledInstrument) {
GetPaymentMethodForHost("a.com"))));
}
IN_PROC_BROWSER_TEST_F(PaymentRequestMinimalUITest, DISABLED_ConfirmPayment) {
IN_PROC_BROWSER_TEST_F(PaymentRequestMinimalUITest, ConfirmPayment) {
// TODO(crbug.com/1061574): ConfirmPayment times out on
// android-marshmallow-arm64-rel bot.
if (test_controller()->IsAndroidMarshmallow())
// android-marshmallow-arm64-rel and "Lollipop Phone Tester" bots.
if (test_controller()->IsAndroidMarshmallowOrLollipop())
return;
InstallPaymentHandlerAndSetMinimalUIBehavior(Behavior::CONFIRM_MINIMAL_UI);
......
......@@ -202,8 +202,10 @@ public class PaymentRequestTestBridge {
@CalledByNative
@VisibleForTesting(otherwise = VisibleForTesting.NONE)
public static boolean isAndroidMarshmallowForTest() {
return Build.VERSION.SDK_INT == Build.VERSION_CODES.M;
public static boolean isAndroidMarshmallowOrLollipopForTest() {
return Build.VERSION.SDK_INT == Build.VERSION_CODES.M
|| Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP
|| Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP_MR1;
}
/**
......
......@@ -48,8 +48,8 @@ bool DismissMinimalUIForTest() {
base::android::AttachCurrentThread());
}
bool IsAndroidMarshmallowForTest() {
return Java_PaymentRequestTestBridge_isAndroidMarshmallowForTest(
bool IsAndroidMarshmallowOrLollipopForTest() {
return Java_PaymentRequestTestBridge_isAndroidMarshmallowOrLollipopForTest(
base::android::AttachCurrentThread());
}
......
......@@ -38,8 +38,8 @@ bool ConfirmMinimalUIForTest();
// Dismisses the minimal UI. Returns true on success.
bool DismissMinimalUIForTest();
// Returns true when running on Android M.
bool IsAndroidMarshmallowForTest();
// Returns true when running on Android M or L.
bool IsAndroidMarshmallowOrLollipopForTest();
// Sets an observer on future Java PaymentRequests that will call these
// callbacks when the events occur.
......
......@@ -78,8 +78,8 @@ class PaymentRequestTestController {
// UI is not implemented on the current platform.
bool DismissMinimalUI();
// Returns true when running on Android M.
bool IsAndroidMarshmallow();
// Returns true when running on Android M or L.
bool IsAndroidMarshmallowOrLollipop();
private:
// Observers that forward through to the PaymentRequestTestObserver.
......
......@@ -31,8 +31,8 @@ bool PaymentRequestTestController::DismissMinimalUI() {
return DismissMinimalUIForTest();
}
bool PaymentRequestTestController::IsAndroidMarshmallow() {
return IsAndroidMarshmallowForTest();
bool PaymentRequestTestController::IsAndroidMarshmallowOrLollipop() {
return IsAndroidMarshmallowOrLollipopForTest();
}
void PaymentRequestTestController::SetUpOnMainThread() {
......
......@@ -92,7 +92,7 @@ bool PaymentRequestTestController::DismissMinimalUI() {
return true;
}
bool PaymentRequestTestController::IsAndroidMarshmallow() {
bool PaymentRequestTestController::IsAndroidMarshmallowOrLollipop() {
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment