Commit 76008910 authored by Raymond Toy's avatar Raymond Toy Committed by Commit Bot

Fix test timeouts for Analyser tests

These analyser tests use a ScriptProcessorNode with 0 outputs.  That's
not actually well-defined in the spec. so create the node with one
output. And also connect the node to the destination so that Chrome
will process it. (Yes, that's a bug in chrome for a deprecated
ScriptProcessorNode.)

Update TestExpectations too.

Bug: 626703
Change-Id: I5f21e6b96c55ff66f76e43b3c7dbc7b2c2635656
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2316791Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#794221}
parent 5b029d1b
......@@ -3475,8 +3475,6 @@ crbug.com/626703 external/wpt/html/rendering/non-replaced-elements/the-page/body
crbug.com/626703 external/wpt/html/rendering/non-replaced-elements/the-page/body-margin-2j.html [ Failure ]
crbug.com/626703 external/wpt/html/rendering/non-replaced-elements/the-page/body-margin-2k.html [ Failure ]
crbug.com/626703 external/wpt/html/rendering/non-replaced-elements/the-page/body-margin-2l.html [ Failure ]
crbug.com/626703 external/wpt/webaudio/the-audio-api/the-analysernode-interface/test-analyser-minimum.html [ Timeout ]
crbug.com/626703 external/wpt/webaudio/the-audio-api/the-analysernode-interface/test-analyser-output.html [ Timeout ]
crbug.com/626703 external/wpt/css/css-fonts/font-synthesis-01.html [ Failure ]
crbug.com/626703 external/wpt/css/css-fonts/font-synthesis-02.html [ Failure ]
crbug.com/626703 external/wpt/css/css-fonts/font-synthesis-03.html [ Failure ]
......
......@@ -159,8 +159,8 @@ function runTest(name)
function testOnNormalContext(callback) {
function testOutput(nodeToInspect, expectedBuffers, callback) {
testLength = 0;
var sp = context.createScriptProcessor(expectedBuffers[0].length, gTest.numberOfChannels, 0);
nodeToInspect.connect(sp);
var sp = context.createScriptProcessor(expectedBuffers[0].length, gTest.numberOfChannels, 1);
nodeToInspect.connect(sp).connect(context.destination);
sp.onaudioprocess = function(e) {
var expectedBuffer = expectedBuffers.shift();
testLength += expectedBuffer.length;
......
......@@ -11,13 +11,13 @@
var ac = new AudioContext();
var analyser = ac.createAnalyser();
var constant = ac.createConstantSource();
var sp = ac.createScriptProcessor(2048, 1, 0);
var sp = ac.createScriptProcessor(2048, 1, 1);
constant.offset.value = 0.0;
constant.connect(analyser).connect(ac.destination);
constant.connect(sp);
constant.connect(sp).connect(ac.destination);
var buf = new Float32Array(analyser.frequencyBinCount);
var iteration_count = 10;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment