mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-28 20:29:03 +00:00
LibWeb: Add BaseAudioContext.createStereoPanner()
factory method
This commit is contained in:
parent
56907e2de6
commit
5fd130b02d
Notes:
github-actions[bot]
2025-01-18 09:21:37 +00:00
Author: https://github.com/tcl3
Commit: 5fd130b02d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3291
6 changed files with 99 additions and 5 deletions
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
stereopannernode-basic.html
|
||||
</title>
|
||||
<script src="../../../resources/testharness.js"></script>
|
||||
<script src="../../../resources/testharnessreport.js"></script>
|
||||
<script src="../../resources/audit-util.js"></script>
|
||||
<script src="../../resources/audit.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script id="layout-test-code">
|
||||
let audit = Audit.createTaskRunner();
|
||||
|
||||
audit.define(
|
||||
{
|
||||
label: 'test',
|
||||
description:
|
||||
'Attributes and basic functionality of StereoPannerNode'
|
||||
},
|
||||
(task, should) => {
|
||||
|
||||
let context = new AudioContext();
|
||||
let panner = context.createStereoPanner();
|
||||
|
||||
should(panner.numberOfInputs, 'panner.numberOfInputs').beEqualTo(1);
|
||||
should(panner.numberOfOutputs, 'panner.numberOfOutputs')
|
||||
.beEqualTo(1);
|
||||
should(panner.pan.defaultValue, 'panner.pan.defaultValue')
|
||||
.beEqualTo(0.0);
|
||||
should(() => panner.pan.value = 1.0, 'panner.pan.value = 1.0')
|
||||
.notThrow();
|
||||
should(panner.pan.value, 'panner.pan.value').beEqualTo(1.0);
|
||||
|
||||
should(() => panner.channelCount = 1, 'panner.channelCount = 1')
|
||||
.notThrow();
|
||||
should(() => panner.channelCount = 3, 'panner.channelCount = 3')
|
||||
.throw();
|
||||
should(
|
||||
() => panner.channelCountMode = 'explicit',
|
||||
'panner.channelCountMode = "explicit"')
|
||||
.notThrow();
|
||||
should(
|
||||
() => panner.channelCountMode = 'max',
|
||||
'panner.channelCountMode = "max"')
|
||||
.throw();
|
||||
|
||||
task.done();
|
||||
});
|
||||
audit.run();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue