diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /testing/web-platform/tests/shared-storage/resources/verify-length-module.js | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-upstream/125.0.1.tar.xz firefox-upstream/125.0.1.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/shared-storage/resources/verify-length-module.js')
-rw-r--r-- | testing/web-platform/tests/shared-storage/resources/verify-length-module.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/shared-storage/resources/verify-length-module.js b/testing/web-platform/tests/shared-storage/resources/verify-length-module.js new file mode 100644 index 0000000000..8ba10fbcb6 --- /dev/null +++ b/testing/web-platform/tests/shared-storage/resources/verify-length-module.js @@ -0,0 +1,18 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +class VerifyLength { + async run(urls, data) { + if (data && data.hasOwnProperty('expectedLength')) { + const expectedLength = data['expectedLength']; + const actualLength = await sharedStorage.length(); + if (actualLength === expectedLength) { + return 1; + } + } + return -1; + } +} + +register('verify-length', VerifyLength); |