1
0
Fork 0
firefox/testing/web-platform/tests/shared-storage/resources/erroneous-function-module.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

24 lines
614 B
JavaScript

// 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 TestURLSelectionOperation {
async run(urls, data) {
await sharedStorage.append('run-attempt', '1');
undefinedVariable;
return -1;
}
}
class VerifyRunAttempts {
async run(urls, data) {
const attempts = await sharedStorage.get('run-attempt');
if (!attempts) {
return -1;
}
return attempts.length;
}
}
register('test-url-selection-operation', TestURLSelectionOperation);
register('verify-run-attempts', VerifyRunAttempts);