forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import wpt@ed50cf49edc57e2e2d3b2b0381fc1f1070e23835
Using wpt-import in Chromium 3543d97. Build: https://build.chromium.org/p/chromium.infra.cron/builders/wpt-importer/builds/136 Background: https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md Note to sheriffs: If this CL causes a small number of new layout test failures, it may be easier to add lines to TestExpectations rather than reverting. Directory owners for changes in this CL: rouslan@chromium.org, mathp@chromium.org: external/wpt/payment-request TBR=qyearsley@chromium.org NOEXPORT=true Change-Id: Ie7007ae595b681df80870b9bc4a9b759dfc8c24c Reviewed-on: https://chromium-review.googlesource.com/520464 Reviewed-by: Blink W3C Test Autoroller <blink-w3c-test-autoroller@chromium.org> Reviewed-by: Quinten Yearsley <qyearsley@chromium.org> Commit-Queue: Blink W3C Test Autoroller <blink-w3c-test-autoroller@chromium.org> Cr-Commit-Position: refs/heads/master@{#476321}
- Loading branch information
1 parent
5e98276
commit 81bd492
Showing
16 changed files
with
936 additions
and
83 deletions.
There are no files selected for viewing
183 changes: 136 additions & 47 deletions
183
third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
Large diffs are not rendered by default.
Oops, something went wrong.
300 changes: 300 additions & 0 deletions
300
third_party/WebKit/LayoutTests/external/wpt/assumptions/ahem-ref.html
Large diffs are not rendered by default.
Oops, something went wrong.
297 changes: 297 additions & 0 deletions
297
third_party/WebKit/LayoutTests/external/wpt/assumptions/ahem.html
Large diffs are not rendered by default.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
.../LayoutTests/external/wpt/payment-request/payment-request-abort-method.https-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This is a testharness.js-based test. | ||
PASS Throws if the promise [[state]] is not "interactive" | ||
FAIL Calling abort must not change the [[state]] until after "interactive" assert_true: Unexpected promise rejection: Request failed expected true got false | ||
FAIL calling .abort() causes acceptPromise to reject and closes the request. assert_true: Unexpected promise rejection: Request failed expected true got false | ||
Harness: the test ran to completion. | ||
|
65 changes: 65 additions & 0 deletions
65
...y/WebKit/LayoutTests/external/wpt/payment-request/payment-request-abort-method.https.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!DOCTYPE html> | ||
<!-- Copyright © 2017 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). --> | ||
<meta charset="utf-8"> | ||
<title>Test for PaymentRequest.abort() method</title> | ||
<link rel="help" href="https://w3c.github.io/browser-payment-api/#abort-method"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script> | ||
"use strict"; | ||
setup(() => {}, { | ||
// Ignore unhandled rejections resulting from .show()'s acceptPromise | ||
// not being explicitly handled. | ||
allow_uncaught_exception: true, | ||
}); | ||
const basicCard = Object.freeze({ supportedMethods: ["basic-card"] }); | ||
const defaultMethods = Object.freeze([basicCard]); | ||
const defaultDetails = Object.freeze({ | ||
total: { | ||
label: "Total", | ||
amount: { | ||
currency: "USD", | ||
value: "1.00", | ||
}, | ||
}, | ||
}); | ||
|
||
promise_test(async t => { | ||
// request is in "created" state | ||
const request = new PaymentRequest(defaultMethods, defaultDetails); | ||
await promise_rejects(t, "InvalidStateError", request.abort()); | ||
}, `Throws if the promise [[state]] is not "interactive"`); | ||
|
||
promise_test(async t => { | ||
// request is in "created" state. | ||
const request = new PaymentRequest(defaultMethods, defaultDetails); | ||
await promise_rejects(t, "InvalidStateError", request.abort()); | ||
// Call it again, for good measure. | ||
await promise_rejects(t, "InvalidStateError", request.abort()); | ||
// The request's state is "created", so let's show it | ||
// which changes the state to "interactive.". | ||
request.show(); | ||
// Let's set request the state to "closed" by calling .abort() | ||
try { | ||
await request.abort(); | ||
} catch (err) { | ||
assert_true(false, "Unexpected promise rejection: " + err.message); | ||
} | ||
// The request is now "closed", so... | ||
await promise_rejects(t, "InvalidStateError", request.abort()); | ||
}, `Calling abort must not change the [[state]] until after "interactive"`); | ||
|
||
promise_test(async t => { | ||
const request = new PaymentRequest(defaultMethods, defaultDetails); | ||
const acceptPromise = request.show(); | ||
try { | ||
await request.abort(); | ||
} catch (err) { | ||
assert_true(false, "Unexpected promise rejection: " + err.message); | ||
} | ||
await promise_rejects(t, "AbortError", acceptPromise); | ||
// As request is now "closed", trying to show it will fail | ||
await promise_rejects(t, "InvalidStateError", request.show()); | ||
}, "calling .abort() causes acceptPromise to reject and closes the request."); | ||
|
||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
...t/LayoutTests/external/wpt/payment-request/payment-request-show-method.https-expected.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
set -ex | ||
|
||
2dcontext/tools/build.sh | ||
assumptions/tools/build.sh | ||
html/tools/build.sh | ||
offscreen-canvas/tools/build.sh |
5 changes: 5 additions & 0 deletions
5
...latform/linux/external/wpt/payment-request/payment-request-show-method.https-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This is a testharness.js-based test. | ||
FAIL Throws if the promise [[state]] is not "created" promise_test: Unhandled rejection with value: object "UnknownError: Request failed" | ||
FAIL If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException. assert_throws: function "function () { throw e }" threw object "UnknownError: Request failed" that is not a DOMException AbortError: property "code" is equal to 0, expected 20 | ||
Harness: the test ran to completion. | ||
|
5 changes: 5 additions & 0 deletions
5
.../mac-mac10.10/external/wpt/payment-request/payment-request-show-method.https-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This is a testharness.js-based test. | ||
FAIL Throws if the promise [[state]] is not "created" promise_test: Unhandled rejection with value: object "UnknownError: Request failed" | ||
FAIL If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException. assert_throws: function "function () { throw e }" threw object "UnknownError: Request failed" that is not a DOMException AbortError: property "code" is equal to 0, expected 20 | ||
Harness: the test ran to completion. | ||
|
6 changes: 6 additions & 0 deletions
6
.../mac-mac10.11/external/wpt/payment-request/payment-request-show-method.https-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This is a testharness.js-based test. | ||
Harness Error. harness_status.status = 1 , harness_status.message = Request failed | ||
FAIL Throws if the promise [[state]] is not "created" promise_test: Unhandled rejection with value: object "UnknownError: Request failed" | ||
FAIL If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException. assert_throws: function "function () { throw e }" threw object "UnknownError: Request failed" that is not a DOMException AbortError: property "code" is equal to 0, expected 20 | ||
Harness: the test ran to completion. | ||
|
6 changes: 6 additions & 0 deletions
6
...m/mac-mac10.9/external/wpt/payment-request/payment-request-show-method.https-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This is a testharness.js-based test. | ||
Harness Error. harness_status.status = 1 , harness_status.message = Request failed | ||
FAIL Throws if the promise [[state]] is not "created" promise_test: Unhandled rejection with value: object "UnknownError: Request failed" | ||
FAIL If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException. assert_throws: function "function () { throw e }" threw object "UnknownError: Request failed" that is not a DOMException AbortError: property "code" is equal to 0, expected 20 | ||
Harness: the test ran to completion. | ||
|
6 changes: 6 additions & 0 deletions
6
...rm/mac-retina/external/wpt/payment-request/payment-request-show-method.https-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This is a testharness.js-based test. | ||
Harness Error. harness_status.status = 1 , harness_status.message = Request failed | ||
FAIL Throws if the promise [[state]] is not "created" promise_test: Unhandled rejection with value: object "UnknownError: Request failed" | ||
FAIL If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException. assert_throws: function "function () { throw e }" threw object "UnknownError: Request failed" that is not a DOMException AbortError: property "code" is equal to 0, expected 20 | ||
Harness: the test ran to completion. | ||
|
5 changes: 5 additions & 0 deletions
5
.../platform/mac/external/wpt/payment-request/payment-request-show-method.https-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This is a testharness.js-based test. | ||
FAIL Throws if the promise [[state]] is not "created" promise_test: Unhandled rejection with value: object "UnknownError: Request failed" | ||
FAIL If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException. assert_throws: function "function () { throw e }" threw object "UnknownError: Request failed" that is not a DOMException AbortError: property "code" is equal to 0, expected 20 | ||
Harness: the test ran to completion. | ||
|
6 changes: 6 additions & 0 deletions
6
.../platform/win/external/wpt/payment-request/payment-request-show-method.https-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This is a testharness.js-based test. | ||
Harness Error. harness_status.status = 1 , harness_status.message = Request failed | ||
FAIL Throws if the promise [[state]] is not "created" promise_test: Unhandled rejection with value: object "UnknownError: Request failed" | ||
FAIL If the user agent's "payment request is showing" boolean is true, then return a promise rejected with an "AbortError" DOMException. assert_throws: function "function () { throw e }" threw object "UnknownError: Request failed" that is not a DOMException AbortError: property "code" is equal to 0, expected 20 | ||
Harness: the test ran to completion. | ||
|