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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-basic.html

Issue 2666703002: Correct confusing error message from OfflineAudioContext.suspend() (Closed)
Patch Set: Refined error message Created 3 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
Index: third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-basic.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-basic.html b/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-basic.html
index eb1ab2354999f03cce277f4899061fb21e707cb3..ba06bce419ed6c1499d2ef3b59a6b91ffd02f8b5 100644
--- a/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-basic.html
+++ b/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-suspend-resume-basic.html
@@ -49,6 +49,17 @@
context.startRendering().then(done);
});
+ // Task: suspending after rendering is finished must be rejected with the
+ // properly clamped frame/time information.
+ audit.defineTask('suspend-after-render-completion', function (done) {
+ var context = new OfflineAudioContext(
+ 1, sampleRate * renderDuration, sampleRate);
+ context.startRendering().then(function () {
+ Should('Scheduling a suspend after the render completion',
+ context.suspend(renderDuration)).beRejected();
+ }).then(done);
+ });
+
// Task: Calling multiple suspends at the same rendering quantum should
// reject the promise.
audit.defineTask('identical-suspend-time', function (done) {
@@ -123,6 +134,7 @@
audit.runTasks(
'suspend-invalid-argument',
'suspend-in-the-past',
+ 'suspend-after-render-completion',
'identical-suspend-time',
'resume-before-suspend',
'resume-without-suspend',

Powered by Google App Engine
This is Rietveld 408576698