зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1619281 [wpt PR 22039] - Update worklet referrer tests to match spec PR, a=testonly
Automatic update from web-platform-tests Update worklet referrer tests to match spec PR (#22039) -- wpt-commits: 4cec5596c806088cd8f1781bdaab1d10abb72394 wpt-pr: 22039
This commit is contained in:
Родитель
df9316abbb
Коммит
5d638c20a9
|
@ -188,7 +188,7 @@ function runReferrerTests(workletType) {
|
|||
scriptOrigins: { topLevel: 'remote',
|
||||
descendant: 'same' } });
|
||||
}, 'Importing a same-origin script from a remote-origin worklet script ' +
|
||||
'that has "same-origin" referrer policy should send referrer.');
|
||||
'that has "same-origin" referrer policy should not send referrer.');
|
||||
|
||||
promise_test(() => {
|
||||
return runReferrerTest({ workletType: workletType,
|
||||
|
@ -197,7 +197,7 @@ function runReferrerTests(workletType) {
|
|||
scriptOrigins: { topLevel: 'remote',
|
||||
descendant: 'remote' } });
|
||||
}, 'Importing a remote-origin script from a remote-origin worklet script ' +
|
||||
'that has "same-origin" referrer policy should not send referrer.');
|
||||
'that has "same-origin" referrer policy should send referrer.');
|
||||
|
||||
// TODO(domfarolino): Add tests for more referrer policies.
|
||||
}
|
||||
|
|
|
@ -51,8 +51,10 @@ function createScriptURLForDecendant(scriptOrigins) {
|
|||
function isDestinationCrossOrigin(fetchType, scriptOrigins) {
|
||||
if (fetchType === 'top-level')
|
||||
return scriptOrigins.topLevel === 'remote';
|
||||
|
||||
// Compute a descendant's cross-origin-ness relative to the top-level script.
|
||||
if (fetchType === 'descendant')
|
||||
return scriptOrigins.descendant === 'remote';
|
||||
return scriptOrigins.descendant !== scriptOrigins.topLevel;
|
||||
assert_unreached('fetchType has an invalid value.');
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче