[go: nahoru, domu]

blob: 198c648afeeaba21e15e9a040f0e2146087c3bd9 [file] [log] [blame]
This is a testharness.js-based test.
[FAIL] Throws if the promise [[state]] is not 'created'.
promise_rejects_dom: function "function() { throw e }" threw object "UnknownError: Renderer process could not establish or lost IPC connection to the PaymentRequest service in the browser process." that is not a DOMException SecurityError: property "code" is equal to 0, expected 18
[FAIL] If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException.
promise_rejects_dom: function "function() { throw e }" threw object "InvalidStateError: Failed to execute 'show' on 'PaymentRequest': Already called show() once" that is not a DOMException AbortError: property "code" is equal to 11, expected 20
[FAIL] If payment method consultation produces no supported method of payment, then return a promise rejected with a "NotSupportedError" DOMException.
promise_rejects_dom: function "function() { throw e }" threw object "InvalidStateError: Failed to execute 'show' on 'PaymentRequest': Already called show() once" that is not a DOMException NotSupportedError: property "code" is equal to 11, expected 9
[FAIL] Calling show() multiple times always returns a new promise.
promise_test: Unhandled rejection with value: object "InvalidStateError: Failed to execute 'abort' on 'PaymentRequest': No show() or retry() in progress, so nothing to abort"
Harness: the test ran to completion.