diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-basic.html | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-basic.html')
-rw-r--r-- | testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-basic.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-basic.html b/testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-basic.html new file mode 100644 index 0000000000..6ce7eb0c10 --- /dev/null +++ b/testing/web-platform/tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-basic.html @@ -0,0 +1,37 @@ +<!doctype html> +<html> + <head> + <title> + Basic Test of AudioBufferSourceNode + </title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/webaudio/resources/audit-util.js"></script> + <script src="/webaudio/resources/audit.js"></script> + <script src="/webaudio/resources/start-stop-exceptions.js"></script> + </head> + <script id="layout-test-code"> + let sampleRate = 44100; + let renderLengthSeconds = 0.25; + + let oscTypes = ['sine', 'square', 'sawtooth', 'triangle', 'custom']; + + let audit = Audit.createTaskRunner(); + + audit.define('start/stop exceptions', (task, should) => { + // We're not going to render anything, so make it simple + let context = new OfflineAudioContext(1, 1, sampleRate); + let node = new AudioBufferSourceNode(context); + + testStartStop(should, node, [ + {args: [0, -1], errorType: RangeError}, + {args: [0, 0, -1], errorType: RangeError} + ]); + task.done(); + }); + + audit.run(); + </script> + <body> + </body> +</html> |