Skip to content

Commit

Permalink
chore: update WPT
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored and github-actions[bot] committed Dec 12, 2024
1 parent d2b332a commit be170c1
Show file tree
Hide file tree
Showing 75 changed files with 3,192 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,32 @@
assert_not_own_property(headers, 'sec-fetch-user');
});
}, 'sec-fetch-user');

promise_test((t) => {
const key = '{{uuid()}}';

return induceRequest(
makeRequestURL(key, ['httpsCrossSite'], {mime: 'text/javascript'}),
t
)
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-storage-access');
});
}, 'sec-fetch-storage-access - Cross-site');

promise_test((t) => {
const key = '{{uuid()}}';

return induceRequest(
makeRequestURL(key, ['httpsSameSite'], {mime: 'text/javascript'}),
t
)
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-storage-access');
});
}, 'sec-fetch-storage-access - Same site');
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,26 @@
assert_not_own_property(headers, 'sec-fetch-user');
});
}, 'sec-fetch-user');

promise_test((t) => {
const key = '{{uuid()}}';

return induceRequest(t, makeRequestURL(key, ['httpsCrossSite']))
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-storage-access');
});
}, 'sec-fetch-storage-access - Cross-site');

promise_test((t) => {
const key = '{{uuid()}}';

return induceRequest(t, makeRequestURL(key, ['httpsSameSite']))
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-storage-access');
});
}, 'sec-fetch-storage-access - Same site');
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,36 @@
});
}, 'sec-fetch-user - Not sent to non-trustworthy cross-site destination');

promise_test((t) => {
const key = '{{uuid()}}';

return induceRequest(t, makeRequestURL(key, ['httpOrigin']))
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-storage-access');
});
}, 'sec-fetch-storage-access - Not sent to non-trustworthy same-origin destination');

promise_test((t) => {
const key = '{{uuid()}}';

return induceRequest(t, makeRequestURL(key, ['httpSameSite']))
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-storage-access');
});
}, 'sec-fetch-storage-access - Not sent to non-trustworthy same-site destination');

promise_test((t) => {
const key = '{{uuid()}}';

return induceRequest(t, makeRequestURL(key, ['httpCrossSite']))
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-storage-access');
});
}, 'sec-fetch-storage-access - Not sent to non-trustworthy cross-site destination');

promise_test((t) => {
const key = '{{uuid()}}';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,151 @@
.then(t.step_func_done(), t.unreached_func());
}, 'list-style-image sec-fetch-user');

async_test((t) => {
const key = '{{uuid()}}';
const url = makeRequestURL(key, ['httpsCrossSite']);

declarations.push(`background-image: url("${url}");`);

whenIframeReady
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-storage-access');
assert_equals(headers['sec-fetch-storage-access'], 'none');
})
.then(t.step_func_done(), (error) => t.unreached_func());
}, 'background-image sec-fetch-storage-access - Cross-site');

async_test((t) => {
const key = '{{uuid()}}';
const url = makeRequestURL(key, ['httpsCrossSite']);

declarations.push(`border-image: url("${url}");`);

whenIframeReady
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-storage-access');
assert_array_equals(headers['sec-fetch-storage-access'], ['none']);
})
.then(t.step_func_done(), t.unreached_func());
}, 'border-image sec-fetch-storage-access - Cross-site');

async_test((t) => {
const key = '{{uuid()}}';
const url = makeRequestURL(key, ['httpsCrossSite']);

declarations.push(`content: url("${url}");`);

whenIframeReady
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-storage-access');
assert_array_equals(headers['sec-fetch-storage-access'], ['none']);
})
.then(t.step_func_done(), t.unreached_func());
}, 'content sec-fetch-storage-access - Cross-site');

async_test((t) => {
const key = '{{uuid()}}';
const url = makeRequestURL(key, ['httpsCrossSite']);

declarations.push(`cursor: url("${url}"), auto;`);

whenIframeReady
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-storage-access');
assert_array_equals(headers['sec-fetch-storage-access'], ['none']);
})
.then(t.step_func_done(), t.unreached_func());
}, 'cursor sec-fetch-storage-access - Cross-site');

async_test((t) => {
const key = '{{uuid()}}';
const url = makeRequestURL(key, ['httpsCrossSite']);

declarations.push(`list-style-image: url("${url}");`);

whenIframeReady
.then(() => retrieve(key))
.then((headers) => {
assert_own_property(headers, 'sec-fetch-storage-access');
assert_array_equals(headers['sec-fetch-storage-access'], ['none']);
})
.then(t.step_func_done(), t.unreached_func());
}, 'list-style-image sec-fetch-storage-access - Cross-site');

async_test((t) => {
const key = '{{uuid()}}';
const url = makeRequestURL(key, ['httpsSameSite']);

declarations.push(`background-image: url("${url}");`);

whenIframeReady
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-storage-access');
})
.then(t.step_func_done(), (error) => t.unreached_func());
}, 'background-image sec-fetch-storage-access - Same site');

async_test((t) => {
const key = '{{uuid()}}';
const url = makeRequestURL(key, ['httpsSameSite']);

declarations.push(`border-image: url("${url}");`);

whenIframeReady
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-storage-access');
})
.then(t.step_func_done(), t.unreached_func());
}, 'border-image sec-fetch-storage-access - Same site');

async_test((t) => {
const key = '{{uuid()}}';
const url = makeRequestURL(key, ['httpsSameSite']);

declarations.push(`content: url("${url}");`);

whenIframeReady
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-storage-access');
})
.then(t.step_func_done(), t.unreached_func());
}, 'content sec-fetch-storage-access - Same site');

async_test((t) => {
const key = '{{uuid()}}';
const url = makeRequestURL(key, ['httpsSameSite']);

declarations.push(`cursor: url("${url}"), auto;`);

whenIframeReady
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-storage-access');
})
.then(t.step_func_done(), t.unreached_func());
}, 'cursor sec-fetch-storage-access - Same site');

async_test((t) => {
const key = '{{uuid()}}';
const url = makeRequestURL(key, ['httpsSameSite']);

declarations.push(`list-style-image: url("${url}");`);

whenIframeReady
.then(() => retrieve(key))
.then((headers) => {
assert_not_own_property(headers, 'sec-fetch-storage-access');
})
.then(t.step_func_done(), t.unreached_func());
}, 'list-style-image sec-fetch-storage-access - Same site');

iframe.srcdoc = declarations.map((declaration, index) => `
<style>.el${index} { ${declaration} }</style><div class="el${index}"></div>`
).join('');
Expand Down
Loading

0 comments on commit be170c1

Please sign in to comment.