-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1903940 [wpt PR 46853] - Shared Storage: Add non-live dataOption …
…to createWorklet for use counter, a=testonly Automatic update from web-platform-tests Shared Storage: Add non-live dataOption to createWorklet for use counter We proposed a breaking change to sharedStorage.createWorklet() in WICG/shared-storage#158. We add a use counter for how frequently createWorklet is called in a non-forward-compatible way according to the proposal (i.e. with a cross-origin script but without the option dataOrigin: "script- origin"). This will help us determine what the impact of this change would be. Bug: 348445878 Change-Id: I3b882a9ec859beb5265ba31d3169fb5e1239cac4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5645568 Reviewed-by: Yao Xiao <[email protected]> Commit-Queue: Cammie Smith Barnes <[email protected]> Cr-Commit-Position: refs/heads/main@{#1318000} -- wpt-commits: 25b56c5748119452697daf6903523c3523fbb64a wpt-pr: 46853
- Loading branch information
1 parent
eae7ce0
commit 7b658b0
Showing
3 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
...ts/shared-storage/cross-origin-create-worklet-data-origin-option.tentative.https.sub.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!doctype html> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/common/utils.js"></script> | ||
<script src="/shared-storage/resources/util.js"></script> | ||
<script src="/shared-storage/resources/util.sub.js"></script> | ||
<script src="/fenced-frame/resources/utils.js"></script> | ||
|
||
<body> | ||
<script> | ||
'use strict'; | ||
|
||
async_test(t => { | ||
testCreateWorkletWithDataOption( | ||
t, "context-origin", "key0", "value0", /*is_same_origin_script=*/false, | ||
/*expect_success=*/true); | ||
}, 'For cross-origin createWorklet with dataOrigin option "context-origin", ' | ||
+ 'there is no error.'); | ||
|
||
async_test(t => { | ||
testCreateWorkletWithDataOption( | ||
t, "script-origin", "key0", "value0", /*is_same_origin_script=*/false, | ||
/*expect_success=*/true); | ||
}, 'For cross-origin createWorklet with dataOrigin option "script-origin", ' | ||
+ 'there is no error.'); | ||
|
||
async_test(t => { | ||
testCreateWorkletWithDataOption( | ||
t, "invalid", "key0", "value0", /*is_same_origin_script=*/false, | ||
/*expect_success=*/false); | ||
}, 'For cross-origin createWorklet with dataOrigin option "invalid", ' | ||
+ 'there is a TypeError thrown.'); | ||
|
||
</script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...sts/shared-storage/same-origin-create-worklet-data-origin-option.tentative.https.sub.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!doctype html> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/common/utils.js"></script> | ||
<script src="/shared-storage/resources/util.js"></script> | ||
<script src="/shared-storage/resources/util.sub.js"></script> | ||
<script src="/fenced-frame/resources/utils.js"></script> | ||
|
||
<body> | ||
<script> | ||
'use strict'; | ||
|
||
async_test(t => { | ||
testCreateWorkletWithDataOption( | ||
t, "context-origin", "key0", "value0", /*is_same_origin_script=*/true, | ||
/*expect_success=*/true); | ||
}, 'For same-origin createWorklet with dataOrigin option "context-origin", ' | ||
+ 'there is no error.'); | ||
|
||
async_test(t => { | ||
testCreateWorkletWithDataOption( | ||
t, "script-origin", "key0", "value0", /*is_same_origin_script=*/true, | ||
/*expect_success=*/true); | ||
}, 'For same-origin createWorklet with dataOrigin option "script-origin", ' | ||
+ 'there is no error.'); | ||
|
||
async_test(t => { | ||
testCreateWorkletWithDataOption( | ||
t, "invalid", "key0", "value0", /*is_same_origin_script=*/true, | ||
/*expect_success=*/false); | ||
}, 'For same-origin createWorklet with dataOrigin option "invalid", ' | ||
+ 'there is a TypeError thrown.'); | ||
|
||
</script> | ||
</body> |