Changeset 246863 in webkit


Ignore:
Timestamp:
Jun 26, 2019 5:39:29 PM (5 years ago)
Author:
aestes@apple.com
Message:

[Payment Request] Set state to Closed when show() is called during an active session
https://bugs.webkit.org/show_bug.cgi?id=199239

Reviewed by Alex Christensen.

Source/WebCore:

According to step 7 of https://w3c.github.io/payment-request/#show-method (as of 26 June
2019), when another payment request is showing, calling show() should set the state?
internal slot to Closed in addition to rejecting the show promise with an AbortError. WebKit
was only doing the latter. Let's do both.

Test: http/tests/paymentrequest/payment-is-showing.https.html

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::show):

LayoutTests:

Copied from web-platform-tests/payment-request/payment-is-showing.https.html and modified to
use UIHelper instead of test_driver.bless.

  • http/tests/paymentrequest/payment-is-showing.https-expected.txt: Added.
  • http/tests/paymentrequest/payment-is-showing.https.html: Added.
  • http/tests/paymentrequest/resources/blank.html: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r246854 r246863  
     12019-06-26  Andy Estes  <aestes@apple.com>
     2
     3        [Payment Request] Set state to Closed when show() is called during an active session
     4        https://bugs.webkit.org/show_bug.cgi?id=199239
     5
     6        Reviewed by Alex Christensen.
     7
     8        Copied from web-platform-tests/payment-request/payment-is-showing.https.html and modified to
     9        use UIHelper instead of test_driver.bless.
     10
     11        * http/tests/paymentrequest/payment-is-showing.https-expected.txt: Added.
     12        * http/tests/paymentrequest/payment-is-showing.https.html: Added.
     13        * http/tests/paymentrequest/resources/blank.html: Added.
     14
    1152019-06-26  Russell Epstein  <russell_e@apple.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r246850 r246863  
     12019-06-26  Andy Estes  <aestes@apple.com>
     2
     3        [Payment Request] Set state to Closed when show() is called during an active session
     4        https://bugs.webkit.org/show_bug.cgi?id=199239
     5
     6        Reviewed by Alex Christensen.
     7
     8        According to step 7 of https://w3c.github.io/payment-request/#show-method (as of 26 June
     9        2019), when another payment request is showing, calling show() should set the [[state]]
     10        internal slot to Closed in addition to rejecting the show promise with an AbortError. WebKit
     11        was only doing the latter. Let's do both.
     12
     13        Test: http/tests/paymentrequest/payment-is-showing.https.html
     14
     15        * Modules/paymentrequest/PaymentRequest.cpp:
     16        (WebCore::PaymentRequest::show):
     17
    1182019-06-26  Joseph Pecoraro  <pecoraro@apple.com>
    219
  • trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp

    r245314 r246863  
    405405    if (PaymentHandler::hasActiveSession(document)) {
    406406        promise.reject(Exception { AbortError });
     407        m_state = State::Closed;
    407408        return;
    408409    }
Note: See TracChangeset for help on using the changeset viewer.