Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: LayoutTests/webaudio/deprecated-audiobuffersource-looping.html

Issue 140973002: Remove AudioBufferSourceNode.looping (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove looping test Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/webaudio/deprecated-audiobuffersource-looping-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/webaudio/deprecated-audiobuffersource-looping.html
diff --git a/LayoutTests/webaudio/deprecated-audiobuffersource-looping.html b/LayoutTests/webaudio/deprecated-audiobuffersource-looping.html
deleted file mode 100644
index 03e739fd243620a04314b33382530eddc6975095..0000000000000000000000000000000000000000
--- a/LayoutTests/webaudio/deprecated-audiobuffersource-looping.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
-<script src="resources/audio-testing.js"></script>
-<script src="resources/audiobuffersource-testing.js"></script>
-<script src="../resources/js-test.js"></script>
-</head>
-
-<body>
-
-<div id="description"></div>
-<div id="console"></div>
-
-<script>
-description("Tests AudioBufferSourceNode looping with a variety of loop points.");
-
-// The following test cases assume an AudioBuffer of length 8 whose PCM data is a linear ramp, 0, 1, 2, 3,...
-
-var tests = [
-
-{ description: "loop whole buffer by default with loopStart == loopEnd == 0",
- loopStartFrame: 0, loopEndFrame: 0, renderFrames: 16, playbackRate: 1, expected: [0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7] },
-
-{ description: "loop whole buffer explicitly",
- loopStartFrame: 0, loopEndFrame: 8, renderFrames: 16, playbackRate: 1, expected: [0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7] },
-
-{ description: "loop from middle to end of buffer",
- loopStartFrame: 4, loopEndFrame: 8, renderFrames: 16, playbackRate: 1, expected: [0,1,2,3,4,5,6,7,4,5,6,7,4,5,6,7] },
-
-{ description: "loop from start to middle of buffer",
- loopStartFrame: 0, loopEndFrame: 4, renderFrames: 16, playbackRate: 1, expected: [0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3] },
-
-{ description: "loop internally from 4 -> 6",
- loopStartFrame: 4, loopEndFrame: 6, renderFrames: 16, playbackRate: 1, expected: [0,1,2,3,4,5,4,5,4,5,4,5,4,5,4,5] },
-
-{ description: "loop internally from 3 -> 7",
- loopStartFrame: 3, loopEndFrame: 7, renderFrames: 16, playbackRate: 1, expected: [0,1,2,3,4,5,6,3,4,5,6,3,4,5,6,3] },
-
-{ description: "loop internally from 4 -> 6 with playbackRate of 0.5",
- loopStartFrame: 4, loopEndFrame: 6, renderFrames: 16, playbackRate: 0.5, expected: [0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 4, 4.5, 5, 5.5] },
-
-{ description: "loop internally from 4 -> 6 with playbackRate of 1.5",
- loopStartFrame: 4, loopEndFrame: 6, renderFrames: 16, playbackRate: 1.5, expected: [0, 1.5, 3, 4.5, 4, 5.5, 5, 4.5, 4, 5.5, 5, 4.5, 4, 5.5, 5, 4.5] },
-
-{ description: "illegal playbackRate of 47 greater than loop length",
- loopStartFrame: 4, loopEndFrame: 6, renderFrames: 16, playbackRate: 47, expected: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] },
-
-// Try illegal loop-points - they should be ignored and we'll loop the whole buffer.
-
-{ description: "illegal loop: loopStartFrame > loopEndFrame",
- loopStartFrame: 7, loopEndFrame: 3, renderFrames: 16, playbackRate: 1, expected: [0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7] },
-
-{ description: "illegal loop: loopStartFrame == loopEndFrame",
- loopStartFrame: 3, loopEndFrame: 3, renderFrames: 16, playbackRate: 1, expected: [0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7] },
-
-{ description: "illegal loop: loopStartFrame < 0",
- loopStartFrame: -45, loopEndFrame: 3, renderFrames: 16, playbackRate: 1, expected: [0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7] },
-
-{ description: "illegal loop: loopEndFrame > bufferLength",
- loopStartFrame: 0, loopEndFrame: 30000, renderFrames: 16, playbackRate: 1, expected: [0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7] },
-
-];
-
-var sampleRate = 44100;
-var buffer;
-var bufferFrameLength = 8;
-var testSpacingFrames = 32;
-var testSpacingSeconds = testSpacingFrames / sampleRate;
-var totalRenderLengthFrames = tests.length * testSpacingFrames;
-
-function runLoopTest(context, testNumber, test) {
- var source = context.createBufferSource();
-
- source.buffer = buffer;
- source.playbackRate.value = test.playbackRate;
- source.looping = true;
- source.loopStart = test.loopStartFrame / context.sampleRate;
- source.loopEnd = test.loopEndFrame / context.sampleRate;
-
- source.connect(context.destination);
-
- // Render each test one after the other, spaced apart by testSpacingSeconds.
- var startTime = testNumber * testSpacingSeconds;
- var duration = test.renderFrames / context.sampleRate;
- source.start(startTime);
- source.stop(startTime + duration);
-}
-
-function runTest() {
- if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- }
-
- window.jsTestIsAsync = true;
-
- // Create offline audio context.
- var context = new webkitOfflineAudioContext(1, totalRenderLengthFrames, sampleRate);
- buffer = createTestBuffer(context, bufferFrameLength);
-
- for (var i = 0; i < tests.length; ++i)
- runLoopTest(context, i, tests[i]);
-
- context.oncomplete = checkAllTests;
- context.startRendering();
-}
-
-runTest();
-successfullyParsed = true;
-
-</script>
-
-</body>
-</html>
« no previous file with comments | « no previous file | LayoutTests/webaudio/deprecated-audiobuffersource-looping-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698