blob: ee0c636cd1366ee359e8079c02a0102fab7c78f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
class SetKey0Operation {
async run(data) {
sharedStorage.set('key0-set-from-worklet', 'value0');
}
}
class VerifyStorageEntriesURLSelectionOperation {
async run(urls, data) {
if (await sharedStorage.get('key0-set-from-worklet') === 'value0' &&
await sharedStorage.get('key0-set-from-document') === 'value0') {
return 1;
}
return -1;
}
}
register('set-key0-operation', SetKey0Operation);
register(
'verify-storage-entries-url-selection-operation',
VerifyStorageEntriesURLSelectionOperation);
|