forked from LadybirdBrowser/ladybird
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Add
BaseAudioContext.createStereoPanner()
factory method
- Loading branch information
Showing
6 changed files
with
99 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...d/wpt-import/webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-basic.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Harness status: OK | ||
|
||
Found 15 tests | ||
|
||
15 Pass | ||
Pass # AUDIT TASK RUNNER STARTED. | ||
Pass Executing "test" | ||
Pass Audit report | ||
Pass > [test] Attributes and basic functionality of StereoPannerNode | ||
Pass panner.numberOfInputs is equal to 1. | ||
Pass panner.numberOfOutputs is equal to 1. | ||
Pass panner.pan.defaultValue is equal to 0. | ||
Pass panner.pan.value = 1.0 did not throw an exception. | ||
Pass panner.pan.value is equal to 1. | ||
Pass panner.channelCount = 1 did not throw an exception. | ||
Pass panner.channelCount = 3 threw NotSupportedError: "StereoPannerNode does not support channel count greater than 2". | ||
Pass panner.channelCountMode = "explicit" did not throw an exception. | ||
Pass panner.channelCountMode = "max" threw NotSupportedError: "StereoPannerNode does not support 'max' as channelCountMode.". | ||
Pass < [test] All assertions passed. (total 9 assertions) | ||
Pass # AUDIT TASK RUNNER FINISHED: 1 tasks ran successfully. |
54 changes: 54 additions & 0 deletions
54
.../wpt-import/webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-basic.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |