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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/audiobuffersource-grain.html

Issue 2581463002: Refactor WebAudio test directory (Closed)
Patch Set: Use correct path for wav result files Created 4 years 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
Index: third_party/WebKit/LayoutTests/webaudio/audiobuffersource-grain.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/audiobuffersource-grain.html b/third_party/WebKit/LayoutTests/webaudio/audiobuffersource-grain.html
deleted file mode 100644
index 94b322785029cbb825d57efc989c26c804a74580..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/webaudio/audiobuffersource-grain.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>Test Start Grain with Delayed Buffer Setting </title>
- <script src="../resources/js-test.js"></script>
- <script src="resources/compatibility.js"></script>
- <script src="resources/audit-util.js"></script>
- <script src="resources/audio-testing.js"></script>
- </head>
-
- <body>
- <script>
- description("Test setting the source buffer after starting the grain");
-
- var context;
- var source;
- var buffer;
- var renderedData;
-
- var sampleRate = 44100;
-
- var testDurationSec = 1;
- var testDurationSamples = testDurationSec * sampleRate;
- var startTime = 0.9 * testDurationSec;
-
- function runTest() {
- window.jsTestIsAsync = true;
-
- context = new OfflineAudioContext(1, testDurationSamples, sampleRate);
- context.oncomplete = checkResult;
-
- buffer = createConstantBuffer(context, testDurationSamples, 1);
- source = context.createBufferSource();
- source.connect(context.destination);
-
- // Start the source BEFORE we set the buffer. The grain offset and duration aren't
- // important, as long as we specify some offset.
- source.start(startTime, .1);
- source.buffer = buffer;
-
- // Render it!
- context.startRendering();
- }
-
- function checkResult(event) {
- var success = false;
-
- renderedData = event.renderedBuffer.getChannelData(0);
-
- // Check that the rendered data is not all zeroes. Any non-zero data means the test
- // passed.
- var startFrame = Math.round(startTime * sampleRate);
- for (k = 0; k < renderedData.length; ++k) {
- if (renderedData[k]) {
- success = true;
- break;
- }
- }
-
- if (success)
- testPassed("Buffer was played.");
- else
- testFailed("Buffer was not played.");
-
- finishJSTest();
- }
-
- runTest();
- successfullyParsed = true;
- </script>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698