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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/offlineaudiocontext-promise.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/offlineaudiocontext-promise.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/offlineaudiocontext-promise.html b/third_party/WebKit/LayoutTests/webaudio/offlineaudiocontext-promise.html
deleted file mode 100644
index 7782da8942c5c8cdb7dc20d7d7831e6dc22be4f7..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/webaudio/offlineaudiocontext-promise.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <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>
- <title>OfflineAudioContext.startRendering Promise with oncomplete</title>
- </head>
-
- <body>
- <script>
- description("Test OfflineAudioContext.startRendering Promise with oncomplete");
-
- var context;
- var promise;
- var renderedData;
- var promiseData;
-
- var sampleRate = 48000;
- var renderSeconds = 1;
- var renderFrames = sampleRate * renderSeconds;
- var contextChannels = 2;
-
- function compareData() {
- // The spec implies that the same buffer is returned by both oncomplete and the promise.
- // Check that they are identical.
- if (renderedData === promiseData) {
- testPassed("AudioBuffer returned by oncomplete and promise are identical");
- } else {
- testFailed("AudioBuffer returned by oncomplete and promise are NOT identical");
- }
- finishJSTest();
- }
-
- function checkResult (event) {
- renderedData = event.renderedBuffer;
- promise.then(function (result) {
- promiseData = result;
- compareData();
- });
- }
-
- // Create an offline context and verify that both the oncomplete and promise are returned with
- // the same stuff.
- function runTest() {
- window.jsTestIsAsync = true;
-
- context = new OfflineAudioContext(contextChannels, renderFrames, sampleRate);
-
- var buffer = context.createBuffer(contextChannels, renderFrames, sampleRate);
- for (var k = 0; k < renderFrames; ++k) {
- buffer.getChannelData(0)[k] = 1;
- buffer.getChannelData(1)[k] = 2;
- }
-
- var source = context.createBufferSource();
- source.buffer = buffer;
- source.connect(context.destination);
- source.start();
-
- context.oncomplete = checkResult;
-
- promise = context.startRendering();
-
- }
-
- runTest();
- successfullyParsed = true;
- </script>
-
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698