Index: third_party/WebKit/LayoutTests/webaudio/audiocontext-close.html |
diff --git a/third_party/WebKit/LayoutTests/webaudio/audiocontext-close.html b/third_party/WebKit/LayoutTests/webaudio/audiocontext-close.html |
index b99613661b2e0f7e334c42117c78d52d57eb59af..d5b1dbdee14a3717fb7b2ebdde63206d80a42e8a 100644 |
--- a/third_party/WebKit/LayoutTests/webaudio/audiocontext-close.html |
+++ b/third_party/WebKit/LayoutTests/webaudio/audiocontext-close.html |
@@ -111,6 +111,28 @@ |
).then(done); |
}); |
+ // Task: test online context (4). |
+ audit.defineTask('test-online-context-4', function (done) { |
+ |
+ // Create a context and verify that its sampleRate and baseLatency return |
+ // valid values whether it's open or closed. |
+ shouldNotThrow("context = new AudioContext()"); |
+ shouldBeGreaterThan("context.sampleRate", "0"); |
+ shouldBeGreaterThan("context.baseLatency", "0"); |
+ |
+ context.close().then( |
+ function () { |
+ testPassed("context.close() was correctly resolved"); |
+ shouldBeGreaterThan("context.sampleRate", "0"); |
+ shouldBeEqualToNumber("context.baseLatency", 0); |
+ }, |
+ function () { |
+ testFailed("context.close() was erroneously rejected"); |
+ } |
+ ).then(done); |
+ |
+ }); |
+ |
// Task: test offline context (1). |
audit.defineTask('test-offline-context-1', function (done) { |