mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Automatic update from web-platform-tests Shared Storage: Make internal web tests external We move the shared storage WPT from wpt_internal/ to external/wpt/ and update file-path URLs in them as necessary. Bug: 1451968,1218540 Change-Id: Ibdf33bbd9b53036e40347f9e6398b73a5860953b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4594158 Commit-Queue: Cammie Smith Barnes <[email protected]> Reviewed-by: Philip Rogers <[email protected]> Reviewed-by: Yao Xiao <[email protected]> Cr-Commit-Position: refs/heads/main@{#1154946} -- wpt-commits: c2ec4c5131d43e0a8b141afa5acbd5bd36181341 wpt-pr: 40427
35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
<!doctype html>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/shared-storage/resources/util.js"></script>
|
|
|
|
<body>
|
|
<script>
|
|
'use strict';
|
|
|
|
promise_test(async () => {
|
|
await addModuleOnce("/shared-storage/resources/simple-module.js");
|
|
await sharedStorage.run("operation1", {keepAlive: true});
|
|
return sharedStorage.run("operation1", {keepAlive: true});
|
|
}, 'run() twice with keepAlive: true');
|
|
|
|
promise_test(async () => {
|
|
await addModuleOnce("/shared-storage/resources/simple-module.js");
|
|
await sharedStorage.run("operation1", {keepAlive: true});
|
|
await sharedStorage.run("operation1", {keepAlive: false});
|
|
try {
|
|
await sharedStorage.run("operation1");
|
|
} catch (e) {
|
|
assert_equals(e.name, 'OperationError');
|
|
assert_equals(e.message, 'The sharedStorage worklet cannot execute' +
|
|
' further operations because the previous' +
|
|
' operation did not include the option' +
|
|
' \'keepAlive: true\'.');
|
|
return;
|
|
}
|
|
assert_unreached("did not reject");
|
|
}, 'run() with keepAlive: true, then keepAlive: false, then error');
|
|
|
|
</script>
|
|
</body>
|