Update web-platform-tests to revision ad219567030d1f99f7310f52a17546b57b70d29e

This commit is contained in:
WPT Sync Bot 2019-02-14 20:36:47 -05:00
parent 2c63d1296b
commit a7e62acbe8
129 changed files with 4156 additions and 590 deletions

View file

@ -272,4 +272,7 @@ gen-signedexchange \
-miRecordSize 100 \
-ignoreErrors true
# Signed Exchange with payload integrity error.
echo 'garbage' | cat sxg/sxg-location.sxg - >sxg/sxg-merkle-integrity-error.sxg
rm -fr $tmpdir

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<title>SignedHTTPExchange with payload integrity error</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="./resources/sxg-util.js"></script>
<body>
<script>
promise_test(async (t) => {
try {
const sxgUrl = get_host_info().HTTPS_ORIGIN + '/signed-exchange/resources/sxg/sxg-merkle-integrity-error.sxg';
const message = await openSXGInIframeAndWaitForMessage(t, sxgUrl);
if (message.is_fallback) {
assert_unreached('Fallback redirect should not have happened');
} else {
assert_unreached('SXG should not have loaded');
}
} catch (e) {
assert_equals(e, 'timeout');
}
}, "SignedHTTPExchange with payload integrity error");
</script>
</body>

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<title>Prefetching SignedHTTPExchange with payload integrity error should fail</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="./resources/sxg-util.js"></script>
<body>
<script>
promise_test(async (t) => {
const sxgUrl = get_host_info().HTTPS_ORIGIN + '/signed-exchange/resources/sxg/sxg-merkle-integrity-error.sxg';
await new Promise(resolve => {
const link = document.createElement('link');
link.rel = 'prefetch';
link.href = sxgUrl;
link.addEventListener('error', t.step_func(() => {
resolve();
}));
link.addEventListener('load', t.step_func(() => {
assert_unreached('Prefetch should fail');
}));
document.body.appendChild(link);
});
}, "Prefetching SignedHTTPExchange with payload integrity error should fail");
</script>
</body>