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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/offlineaudiocontext-suspend-resume-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-suspend-resume-promise.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/offlineaudiocontext-suspend-resume-promise.html b/third_party/WebKit/LayoutTests/webaudio/offlineaudiocontext-suspend-resume-promise.html
deleted file mode 100644
index f38d94fc8c2680076b25799155446c615252c60b..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/webaudio/offlineaudiocontext-suspend-resume-promise.html
+++ /dev/null
@@ -1,69 +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>
- </head>
-
- <body>
- <script>
- description('Test promise resolution of OfflineAudioContext.resume() and OfflineAudioContext.suspend().');
- window.jsTestIsAsync = true;
-
- var context;
-
- // The sample rate is multiple of the rendering quantum, so suspension
- // times fall in to the render quantum boundary.
- var renderQuantum = 128;
-
- var sampleRate = renderQuantum * 100;
- var renderDuration = 2;
- var scheduledSuspendTime = 0;
-
- // With the sample rate setting above, this ensures suspension time fall
- // in to the render quantum boundary.
- var suspendInterval = 0.25;
-
- context = new OfflineAudioContext(1, sampleRate * renderDuration, sampleRate);
-
- function onSuspended() {
- if (context.state === 'suspended' && context.currentTime === scheduledSuspendTime) {
-
- testPassed('suspend promise resolved: context is suspended at ' +
- scheduledSuspendTime + ' second(s).');
-
- scheduledSuspendTime = context.currentTime + suspendInterval;
-
- // Scheduling a suspend before the render duration should pass.
- if (scheduledSuspendTime < renderDuration) {
- context.suspend(scheduledSuspendTime).then(onSuspended);
- testPassed('A new suspend has been scheduled at ' +
- scheduledSuspendTime + ' second(s).');
- }
-
- // Scheduling a suspend exactly at the render duration should be
- // rejected.
- if (scheduledSuspendTime === renderDuration) {
- Should('Scheduling at ' + renderDuration + ' seconds',
- context.suspend(scheduledSuspendTime)).beRejected();
- }
-
- context.resume();
- }
- }
-
- // Schedule the first suspension.
- context.suspend(scheduledSuspendTime).then(onSuspended);
- testPassed('A new suspend has been scheduled at ' + scheduledSuspendTime + ' second(s).');
-
- context.startRendering().then(function () {
- Should('Promise context.state', context.state).beEqualTo('closed');
- }).then(finishJSTest);
-
- successfullyParsed = true;
- </script>
-
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698