[wpt-sync] Sync PR 15332 - [Payment Request][WPT] Fix inactive page tests.

RESOLVED FIXED in Firefox 67

Status

enhancement
P4
normal
RESOLVED FIXED
4 months ago
3 months ago

People

(Reporter: wptsync, Unassigned)

Tracking

unspecified
mozilla67
Points:
---

Firefox Tracking Flags

(firefox67 fixed)

Details

(Whiteboard: [wptsync downstream], )

Assignee

Description

4 months ago

Sync web-platform-tests PR 15332 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/15332
Details from upstream follow.

Rouslan Solomakhin <rouslan@chromium.org> wrote:

[Payment Request][WPT] Fix inactive page tests.

Before this patch, the tests for calling PaymentRequest.show() in an
inactive document failed because the renderer checked for an IPC
connection to the browser and rejected the show() promise with an
InvalidStateError because of the lack of the IPC connection. This
happens because the IPC connection is terminated after the browser
payment sheet closes, which happens upon a page becoming inactive.
Instead, the renderer should check for an active document first and
reject with AbortError in an inactive document.

This patch makes PaymentRequest.show() check for an active document
first and reject with AbortError in an inactive document. The IPC
connection is checked second.

This patch also makes a couple of active document test cases manual for
ease of testing. The last test case is not moved and is still failing.
It is unlikely to ever pass in Chrome, because it navigates away the
context where a PaymentRequest.show() promise object was created. After
the navigation, the promise object cannot change state in Chrome.

After this patch, two manual test cases for active document are passing
in Chrome.

Bug: 929773
Change-Id: Idbe9dbd03a69c18a4d24ba34642e6c7046026c62
Reviewed-on: https://chromium-review.googlesource.com/1463664
WPT-Export-Revision: a55b73a8e301575675a1eff762a1a69e631dc298

Assignee

Updated

4 months ago
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Assignee

Updated

4 months ago
Component: web-platform-tests → DOM: Web Payments
Product: Testing → Core
Assignee

Updated

4 months ago
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Assignee

Updated

4 months ago
Component: DOM: Web Payments → web-platform-tests
Product: Core → Testing
Assignee

Comment 3

4 months ago
Ran 2 tests
TIMEOUT: 1

New tests that have failures or other problems:
/payment-request/rejects_if_not_active_manual.https.html: TIMEOUT

Tests that are disabled for instability:
/payment-request/rejects_if_not_active.https.html

Comment 4

3 months ago
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ec1f4ffa35d1
[wpt PR 15332] - [Payment Request][WPT] Fix inactive page tests., a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/1c5a3f8b212a
[wpt PR 15332] - Update wpt metadata, a=testonly

Comment 5

3 months ago
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a6925bbf0b58
[wpt PR 15332] - [Payment Request][WPT] Fix inactive page tests., a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/4e826d648be4
[wpt PR 15332] - Update wpt metadata, a=testonly

Comment 6

3 months ago
bugherder
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.