+ Bad details - causes `detailsPromise` to reject.
+
+
+ Click on each button in sequence from top to bottom without refreshing the page.
+ No payment sheet should be shown, as all provided values cause an error.
+
+
+
+ If you see a payment sheet, it means the test has failed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ If you find a buggy test, please file a bug
+ and tag one of the owners.
+
diff --git a/tests/wpt/web-platform-tests/payment-request/show-method-optional-promise-resolves-manual.https.html b/tests/wpt/web-platform-tests/payment-request/show-method-optional-promise-resolves-manual.https.html
new file mode 100644
index 00000000000..44e23b09884
--- /dev/null
+++ b/tests/wpt/web-platform-tests/payment-request/show-method-optional-promise-resolves-manual.https.html
@@ -0,0 +1,319 @@
+
+
+Test for PaymentRequest.show(optional promise) method
+
+
+
+
+
+ These test cause detailsPromise to resolve successfully with some updated value. As such, that will cause
+ something in the payment sheet to change. Each test describes what is expected to change - if anything.
+
+
+ Instructions: Click on each button in sequence from top to bottom without refreshing the page. The payment
+ sheet will be shown. If required, confirm that the expected value appears in the payment sheet. Finally, manually abort/cancel
+ the payment request by closing the payment sheet.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ If you find a buggy test, please file a bug
+ and tag one of the owners.
+
diff --git a/tests/wpt/web-platform-tests/streams/piping/close-propagation-forward.js b/tests/wpt/web-platform-tests/streams/piping/close-propagation-forward.js
index 113e455a20c..0f0b7bb1a35 100644
--- a/tests/wpt/web-platform-tests/streams/piping/close-propagation-forward.js
+++ b/tests/wpt/web-platform-tests/streams/piping/close-propagation-forward.js
@@ -448,12 +448,15 @@ promise_test(() => {
// Flush async events and verify that no shutdown occurs.
return flushAsyncEvents().then(() => {
assert_array_equals(ws.events, ['write', 'a'],
- 'the chunk must have been written, but close must not have happened yet');
+ 'the chunk must have been written, but close must not have happened');
assert_equals(pipeComplete, false, 'the pipe must not be complete');
resolveWritePromise();
return pipePromise;
+ }).then(() => flushAsyncEvents()).then(() => {
+ assert_array_equals(ws.events, ['write', 'a'],
+ 'the chunk must have been written, but close must not have happened');
});
}, 'Closing must be propagated forward: shutdown must not occur until the final write completes; preventClose = true');
@@ -488,7 +491,7 @@ promise_test(() => {
return writeCalledPromise.then(() => flushAsyncEvents()).then(() => {
assert_array_equals(ws.events, ['write', 'a'],
- 'the chunk must have been written, but close must not have happened yet');
+ 'the first chunk must have been written, but close must not have happened yet');
assert_false(pipeComplete, 'the pipe should not complete while the first write is pending');
rs.controller.close();
@@ -537,21 +540,21 @@ promise_test(() => {
return writeCalledPromise.then(() => flushAsyncEvents()).then(() => {
assert_array_equals(ws.events, ['write', 'a'],
- 'the chunk must have been written, but close must not have happened yet');
+ 'the first chunk must have been written, but close must not have happened');
assert_false(pipeComplete, 'the pipe should not complete while the first write is pending');
rs.controller.close();
resolveWritePromise();
}).then(() => flushAsyncEvents()).then(() => {
assert_array_equals(ws.events, ['write', 'a', 'write', 'b'],
- 'the second chunk must have been written, but close must not have happened yet');
+ 'the second chunk must have been written, but close must not have happened');
assert_false(pipeComplete, 'the pipe should not complete while the second write is pending');
resolveWritePromise();
return pipePromise;
}).then(() => flushAsyncEvents()).then(() => {
assert_array_equals(ws.events, ['write', 'a', 'write', 'b'],
- 'all chunks must have been written, but close must not have happened yet');
+ 'all chunks must have been written, but close must not have happened');
});
}, 'Closing must be propagated forward: shutdown must not occur until the final write completes; becomes closed after first write; preventClose = true');
diff --git a/tests/wpt/web-platform-tests/streams/piping/error-propagation-forward.js b/tests/wpt/web-platform-tests/streams/piping/error-propagation-forward.js
index cf95c443275..983b92b9c3f 100644
--- a/tests/wpt/web-platform-tests/streams/piping/error-propagation-forward.js
+++ b/tests/wpt/web-platform-tests/streams/piping/error-propagation-forward.js
@@ -428,6 +428,50 @@ promise_test(t => {
}, 'Errors must be propagated forward: shutdown must not occur until the final write completes');
+promise_test(t => {
+
+ const rs = recordingReadableStream();
+
+ let resolveWriteCalled;
+ const writeCalledPromise = new Promise(resolve => {
+ resolveWriteCalled = resolve;
+ });
+
+ let resolveWritePromise;
+ const ws = recordingWritableStream({
+ write() {
+ resolveWriteCalled();
+
+ return new Promise(resolve => {
+ resolveWritePromise = resolve;
+ });
+ }
+ });
+
+ let pipeComplete = false;
+ const pipePromise = promise_rejects(t, error1, rs.pipeTo(ws, { preventAbort: true })).then(() => {
+ pipeComplete = true;
+ });
+
+ rs.controller.enqueue('a');
+
+ return writeCalledPromise.then(() => {
+ rs.controller.error(error1);
+
+ // Flush async events and verify that no shutdown occurs.
+ return flushAsyncEvents();
+ }).then(() => {
+ assert_array_equals(ws.events, ['write', 'a']); // no 'abort'
+ assert_equals(pipeComplete, false, 'the pipe must not be complete');
+
+ resolveWritePromise();
+ return pipePromise;
+ }).then(() => flushAsyncEvents()).then(() => {
+ assert_array_equals(ws.events, ['write', 'a']); // no 'abort'
+ });
+
+}, 'Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true');
+
promise_test(t => {
const rs = recordingReadableStream();
@@ -457,7 +501,8 @@ promise_test(t => {
rs.controller.enqueue('b');
return writeCalledPromise.then(() => flushAsyncEvents()).then(() => {
- assert_array_equals(ws.events, ['write', 'a'], 'abort should not be called before the first write completes');
+ assert_array_equals(ws.events, ['write', 'a'],
+ 'the first chunk must have been written, but abort must not have happened yet');
assert_false(pipeComplete, 'the pipe should not complete while the first write is pending');
rs.controller.error(error1);
@@ -465,15 +510,65 @@ promise_test(t => {
return flushAsyncEvents();
}).then(() => {
assert_array_equals(ws.events, ['write', 'a', 'write', 'b'],
- 'abort should not be called before the second write completes');
+ 'the second chunk must have been written, but abort must not have happened yet');
assert_false(pipeComplete, 'the pipe should not complete while the second write is pending');
resolveWritePromise();
return pipePromise;
}).then(() => {
- assert_array_equals(ws.events, ['write', 'a', 'write', 'b', 'abort', error1], 'sink abort should be called');
+ assert_array_equals(ws.events, ['write', 'a', 'write', 'b', 'abort', error1],
+ 'all chunks must have been written and abort must have happened');
});
-}, 'Errors must be propagated forward: abort should not happen until all queued writes complete');
+}, 'Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write');
+
+promise_test(t => {
+
+ const rs = recordingReadableStream();
+
+ let resolveWriteCalled;
+ const writeCalledPromise = new Promise(resolve => {
+ resolveWriteCalled = resolve;
+ });
+
+ let resolveWritePromise;
+ const ws = recordingWritableStream({
+ write() {
+ resolveWriteCalled();
+
+ return new Promise(resolve => {
+ resolveWritePromise = resolve;
+ });
+ }
+ }, new CountQueuingStrategy({ highWaterMark: 2 }));
+
+ let pipeComplete = false;
+ const pipePromise = promise_rejects(t, error1, rs.pipeTo(ws, { preventAbort: true })).then(() => {
+ pipeComplete = true;
+ });
+
+ rs.controller.enqueue('a');
+ rs.controller.enqueue('b');
+
+ return writeCalledPromise.then(() => flushAsyncEvents()).then(() => {
+ assert_array_equals(ws.events, ['write', 'a'],
+ 'the first chunk must have been written, but abort must not have happened');
+ assert_false(pipeComplete, 'the pipe should not complete while the first write is pending');
+
+ rs.controller.error(error1);
+ resolveWritePromise();
+ }).then(() => flushAsyncEvents()).then(() => {
+ assert_array_equals(ws.events, ['write', 'a', 'write', 'b'],
+ 'the second chunk must have been written, but abort must not have happened');
+ assert_false(pipeComplete, 'the pipe should not complete while the second write is pending');
+
+ resolveWritePromise();
+ return pipePromise;
+ }).then(() => flushAsyncEvents()).then(() => {
+ assert_array_equals(ws.events, ['write', 'a', 'write', 'b'],
+ 'all chunks must have been written, but abort must not have happened');
+ });
+
+}, 'Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true');
done();
diff --git a/tests/wpt/web-platform-tests/tools/ci/before_install.sh b/tests/wpt/web-platform-tests/tools/ci/before_install.sh
old mode 100755
new mode 100644
index bf7d48c0042..9b80fd95785
--- a/tests/wpt/web-platform-tests/tools/ci/before_install.sh
+++ b/tests/wpt/web-platform-tests/tools/ci/before_install.sh
@@ -1,13 +1,13 @@
#!/bin/bash
set -e
-if [[ $(./wpt test-jobs --includes $JOB; echo $?) -eq 0 ]]; then
+if [[ -z ${RUN_JOB+x} && $(./wpt test-jobs --includes $JOB; echo $?) -eq 0 ]] || [[ $RUN_JOB -eq 1 ]]; then
export RUN_JOB=1
git submodule update --init --recursive 1>&2
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start 1>&2
# For uploading the manifest
export WPT_MANIFEST_FILE=$HOME/meta/MANIFEST-$(git rev-parse HEAD).json
-else
+elif [[ -z ${RUN_JOB+x} ]]; then
export RUN_JOB=0
fi
diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_lint.sh b/tests/wpt/web-platform-tests/tools/ci/ci_lint.sh
old mode 100644
new mode 100755
diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_manifest.sh b/tests/wpt/web-platform-tests/tools/ci/ci_manifest.sh
old mode 100644
new mode 100755
diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_stability.sh b/tests/wpt/web-platform-tests/tools/ci/ci_stability.sh
old mode 100644
new mode 100755
diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_wpt.sh b/tests/wpt/web-platform-tests/tools/ci/ci_wpt.sh
old mode 100644
new mode 100755
diff --git a/tests/wpt/web-platform-tests/tools/ci/run.sh b/tests/wpt/web-platform-tests/tools/ci/run.sh
index d126dbe3e57..ae58f58c336 100755
--- a/tests/wpt/web-platform-tests/tools/ci/run.sh
+++ b/tests/wpt/web-platform-tests/tools/ci/run.sh
@@ -6,5 +6,5 @@ WPT_ROOT=$(readlink -f $SCRIPT_DIR/../..)
cd $WPT_ROOT
if [[ $RUN_JOB -eq 1 ]]; then
- . $SCRIPT
+ $SCRIPT
fi
diff --git a/tests/wpt/web-platform-tests/tools/manifest/vcs.py b/tests/wpt/web-platform-tests/tools/manifest/vcs.py
index 010bce81a9c..8d5e7854eb6 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/vcs.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/vcs.py
@@ -14,7 +14,11 @@ class Git(object):
def get_func(repo_path):
def git(cmd, *args):
full_cmd = ["git", cmd] + list(args)
- return subprocess.check_output(full_cmd, cwd=repo_path, stderr=subprocess.STDOUT)
+ try:
+ return subprocess.check_output(full_cmd, cwd=repo_path, stderr=subprocess.STDOUT)
+ except WindowsError:
+ full_cmd[0] = "git.bat"
+ return subprocess.check_output(full_cmd, cwd=repo_path, stderr=subprocess.STDOUT)
return git
@classmethod
diff --git a/tests/wpt/web-platform-tests/workers/data-url-shared.html b/tests/wpt/web-platform-tests/workers/data-url-shared.html
index 7b51b4b9207..aae76d46cd7 100644
--- a/tests/wpt/web-platform-tests/workers/data-url-shared.html
+++ b/tests/wpt/web-platform-tests/workers/data-url-shared.html
@@ -40,7 +40,7 @@ assert_worker_throws('indexedDB is inaccessible', 'self.indexedDB.open("someDBNa
assert_worker_sends_pass('cross-origin worker', '', 'fetch("/").then(() => port.postMessage("FAIL"), () => port.postMessage("PASS"))');
// 'data:' workers have opaque origin
-assert_worker_sends_pass('worker has opaque origin', 'application/javascript', 'if (self.location.origin == "null") port.postMessage("PASS"); else { port.postMessage("FAIL"); }');
+assert_worker_sends_pass('worker has opaque origin', 'application/javascript', 'port.postMessage(self.location.origin == "null" ? "PASS" : "FAIL")');
function openWindow(url) {
return new Promise(resolve => {