Bug 1893959 [wpt PR 45951] - Remove appcache tests for fetch metadata., a=testonly

Automatic update from web-platform-tests
Remove appcache tests for fetch metadata.

We're generating these tests, but [no browser supports the underlying
feature][1]. Let's stop generating them.

[1]: https://wpt.fyi/results/fetch/metadata/generated?label=master&label=experimental&aligned&q=fetch%2Fmetadata

Change-Id: I65092ac35c74227c4b24d95b4dc07beac5707628
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5490688
Commit-Queue: Mike West <mkwst@chromium.org>
Reviewed-by: Antonio Sartori <antoniosartori@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1293613}

--

wpt-commits: 42659732d5374fca859ab850785ef328c6050a9c
wpt-pr: 45951
This commit is contained in:
Mike West 2024-04-30 16:05:26 +00:00 committed by moz-wptsync-bot
parent 42d5173457
commit d6c3bd6601
3 changed files with 0 additions and 416 deletions

View File

@ -1,341 +0,0 @@
<!DOCTYPE html>
<!--
This test was procedurally generated. Please do not modify it directly.
Sources:
- fetch/metadata/tools/fetch-metadata.conf.yml
- fetch/metadata/tools/templates/appcache-manifest.sub.https.html
-->
<html lang="en">
<meta charset="utf-8">
<title>HTTP headers on request for Appcache manifest</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/fetch/metadata/resources/helper.sub.js"></script>
<body>
<script>
'use strict';
function induceRequest(url) {
const iframe = document.createElement('iframe');
iframe.src =
'/fetch/metadata/resources/appcache-iframe.sub.html?manifest=' + encodeURIComponent(url);
return new Promise((resolve) => {
addEventListener('message', function onMessage(event) {
if (event.source !== iframe.contentWindow) {
return;
}
removeEventListener('message', onMessage);
resolve(event.data);
});
document.body.appendChild(iframe);
})
.then((message) => {
if (message !== 'okay') {
throw message;
}
})
.then(() => iframe.remove());
}
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsOrigin']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['same-origin']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Same origin');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsCrossSite']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['cross-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Cross-site');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsSameSite']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['same-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Same site');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsOrigin', 'httpOrigin']))
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-site');
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - HTTPS downgrade (header not sent)');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpOrigin', 'httpsOrigin']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['cross-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - HTTPS upgrade');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsOrigin', 'httpOrigin', 'httpsOrigin']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['cross-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - HTTPS downgrade-upgrade');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsOrigin', 'httpsCrossSite', 'httpsOrigin']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['cross-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Same-Origin -> Cross-Site -> Same-Origin redirect');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsOrigin', 'httpsSameSite', 'httpsOrigin']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['same-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Same-Origin -> Same-Site -> Same-Origin redirect');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsCrossSite', 'httpsOrigin']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['cross-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Cross-Site -> Same Origin');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsCrossSite', 'httpsSameSite']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['cross-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Cross-Site -> Same-Site');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsCrossSite', 'httpsCrossSite']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['cross-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Cross-Site -> Cross-Site');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsOrigin', 'httpsOrigin']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['same-origin']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Same-Origin -> Same Origin');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsOrigin', 'httpsSameSite']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['same-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Same-Origin -> Same-Site');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsOrigin', 'httpsCrossSite']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['cross-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Same-Origin -> Cross-Site');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsSameSite', 'httpsOrigin']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['same-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Same-Site -> Same Origin');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsSameSite', 'httpsSameSite']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['same-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Same-Site -> Same-Site');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, ['httpsSameSite', 'httpsCrossSite']))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-site');
assert_array_equals(headers['sec-fetch-site'], ['cross-site']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-site - Same-Site -> Cross-Site');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, []))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-mode');
assert_array_equals(headers['sec-fetch-mode'], ['no-cors']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-mode');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, []))
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-dest');
assert_array_equals(headers['sec-fetch-dest'], ['empty']);
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-dest');
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, []))
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-user');
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, 'sec-fetch-user');
</script>
</body>
</html>

View File

@ -43,8 +43,6 @@ cases:
origins: [httpCrossSite]
description: Not sent to non-trustworthy cross-site destination
template_axes:
# Unused
appcache-manifest.sub.https.html: []
# The `audioWorklet` interface is only available in secure contexts
# https://webaudio.github.io/web-audio-api/#BaseAudioContext
audioworklet.https.sub.html: []
@ -117,7 +115,6 @@ cases:
# https://html.spec.whatwg.org/#fetch-a-single-module-script
worker-dedicated-constructor.sub.html: []
appcache-manifest.sub.https.html: [{}]
audioworklet.https.sub.html: [{}]
css-images.sub.html:
- filename_flags: [tentative]
@ -196,7 +193,6 @@ cases:
# https://html.spec.whatwg.org/#fetch-a-single-module-script
worker-dedicated-constructor.sub.html: []
appcache-manifest.sub.https.html: [{}]
css-images.sub.html:
- filename_flags: [tentative]
css-font-face.sub.html:
@ -289,7 +285,6 @@ cases:
# https://html.spec.whatwg.org/#fetch-a-single-module-script
worker-dedicated-constructor.sub.html: []
appcache-manifest.sub.https.html: [{}]
audioworklet.https.sub.html: [{}]
css-images.sub.html:
- filename_flags: [tentative]
@ -377,7 +372,6 @@ cases:
worker-dedicated-constructor.sub.html: []
worker-dedicated-importscripts.sub.html: []
# Avoid duplicate subtest for 'sec-fetch-site - HTTPS downgrade-upgrade'
appcache-manifest.sub.https.html: []
css-images.sub.html:
- filename_flags: [tentative]
element-a.sub.html: [{}]
@ -409,8 +403,6 @@ cases:
filename_flags: [https]
origins: []
template_axes:
appcache-manifest.sub.https.html:
- expected: no-cors
audioworklet.https.sub.html:
# https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-module-script
- expected: cors
@ -586,8 +578,6 @@ cases:
filename_flags: [https]
origins: []
template_axes:
appcache-manifest.sub.https.html:
- expected: empty
audioworklet.https.sub.html:
# https://github.com/WebAudio/web-audio-api/issues/2203
- expected: audioworklet
@ -709,8 +699,6 @@ cases:
filename_flags: [https]
origins: []
template_axes:
appcache-manifest.sub.https.html:
- expected: NULL
audioworklet.https.sub.html:
- expected: NULL
css-images.sub.html:

View File

@ -1,63 +0,0 @@
<!DOCTYPE html>
<!--
[%provenance%]
-->
<html lang="en">
<meta charset="utf-8">
<title>HTTP headers on request for Appcache manifest</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/fetch/metadata/resources/helper.sub.js"></script>
<body>
<script>
'use strict';
function induceRequest(url) {
const iframe = document.createElement('iframe');
iframe.src =
'/fetch/metadata/resources/appcache-iframe.sub.html?manifest=' + encodeURIComponent(url);
return new Promise((resolve) => {
addEventListener('message', function onMessage(event) {
if (event.source !== iframe.contentWindow) {
return;
}
removeEventListener('message', onMessage);
resolve(event.data);
});
document.body.appendChild(iframe);
})
.then((message) => {
if (message !== 'okay') {
throw message;
}
})
.then(() => iframe.remove());
}
{%- for subtest in subtests %}
async_test((t) => {
const key = '{{uuid()}}';
assert_implements_optional(
!!window.applicationCache, 'Application Cache supported.'
);
induceRequest(makeRequestURL(key, [% subtest.origins %]))
.then(() => retrieve(key))
.then((headers) => {
{%- if subtest.expected == none %}
assert_not_own_property(headers, '[%subtest.headerName%]');
{%- else %}
assert_own_property(headers, '[%subtest.headerName%]');
assert_array_equals(headers['[%subtest.headerName%]'], ['[%subtest.expected%]']);
{%- endif %}
})
.then(() => t.done(), t.step_func((error) => { throw error; }));
}, '[%subtest.headerName%][%subtest.description | pad("start", " - ")%]');
{%- endfor %}
</script>
</body>
</html>