tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit c438612ba6a4987965a8efc89541d233eb458e8d
parent 3fd610c42a5a7f9795a48e70e80c3a15aa149e69
Author: Saqlain <2mesaqlain@gmail.com>
Date:   Thu, 30 Oct 2025 18:57:20 +0000

Bug 1996337 [wpt PR 55646] - [webaudio-testharness] Migrate realtimeanalyser-basic.html, a=testonly

Automatic update from web-platform-tests
[webaudio-testharness] Migrate realtimeanalyser-basic.html

Convert realtimeanalyser-basic.html from the legacy audit.js runner to
pure testharness.js

Bug: 396477778
Change-Id: I0e90d090e8af5724e7c918666027f874d9955422
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7056982
Commit-Queue: Saqlain <2mesaqlain@gmail.com>
Reviewed-by: Michael Wilson <mjwilson@chromium.org>
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1535289}

--

wpt-commits: 5992d2f07086632f5f026469cf46e9937696c226
wpt-pr: 55646

Diffstat:
Mtesting/web-platform/tests/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-basic.html | 51+++++++++++++++++++++------------------------------
1 file changed, 21 insertions(+), 30 deletions(-)

diff --git a/testing/web-platform/tests/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-basic.html b/testing/web-platform/tests/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-basic.html @@ -2,56 +2,47 @@ <html> <head> <title> - realtimeanalyser-basic.html + Basic AnalyserNode test </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> </head> <body> - <script id="layout-test-code"> - let context = 0; + <script> + test(() => { + const context = new AudioContext(); + const analyser = new AnalyserNode(context); - let audit = Audit.createTaskRunner(); + assert_equals( + analyser.numberOfInputs, 1, 'Number of inputs for AnalyserNode'); - audit.define('Basic AnalyserNode test', function(task, should) { - context = new AudioContext(); - let analyser = context.createAnalyser(); + assert_equals( + analyser.numberOfOutputs, 1, 'Number of outputs for AnalyserNode'); - should(analyser.numberOfInputs, 'Number of inputs for AnalyserNode') - .beEqualTo(1); + assert_equals(analyser.minDecibels, -100, 'Default minDecibels value'); - should(analyser.numberOfOutputs, 'Number of outputs for AnalyserNode') - .beEqualTo(1); + assert_equals(analyser.maxDecibels, -30, 'Default maxDecibels value'); - should(analyser.minDecibels, 'Default minDecibels value') - .beEqualTo(-100); - - should(analyser.maxDecibels, 'Default maxDecibels value') - .beEqualTo(-30); - - should( + assert_equals( analyser.smoothingTimeConstant, - 'Default smoothingTimeConstant value') - .beEqualTo(0.8); + 0.8, + 'Default smoothingTimeConstant value'); let expectedValue = -50 - (1 / 3); analyser.minDecibels = expectedValue; - should(analyser.minDecibels, 'node.minDecibels = ' + expectedValue) - .beEqualTo(expectedValue); + assert_equals( + analyser.minDecibels, expectedValue, + `node.minDecibels = ${expectedValue}`); expectedValue = -40 - (1 / 3); analyser.maxDecibels = expectedValue; - should(analyser.maxDecibels, 'node.maxDecibels = ' + expectedValue) - .beEqualTo(expectedValue); - - task.done(); - }); - - audit.run(); + assert_equals( + analyser.maxDecibels, expectedValue, + `node.maxDecibels = ${expectedValue}`); + }, 'Basic AnalyserNode test'); </script> </body> </html>