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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/audiocontext-close.html

Issue 2345693002: Move close() from BaseAudioContext to AudioContext (Closed)
Patch Set: Update expected results Created 4 years, 3 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/audiocontext-close.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/audiocontext-close.html b/third_party/WebKit/LayoutTests/webaudio/audiocontext-close.html
index a0831dd4679fec7198f95d5103fc9c4b13670cd1..b99613661b2e0f7e334c42117c78d52d57eb59af 100644
--- a/third_party/WebKit/LayoutTests/webaudio/audiocontext-close.html
+++ b/third_party/WebKit/LayoutTests/webaudio/audiocontext-close.html
@@ -114,47 +114,11 @@
// Task: test offline context (1).
audit.defineTask('test-offline-context-1', function (done) {
- // For an offline context, just check that if we try to close the context,
- // nothing happens except that the promise returned by close() is rejected.
+ // For an offline context, verify that close is not defined.
shouldNotThrow("offline = new OfflineAudioContext(1, 1000, 48000)");
shouldBeEqualToString("offline.state", "suspended");
- offline.close().then(
- function () {
- testFailed("Closing offline context erroneously resolved");
- },
- function (e) {
- if (e.name === "InvalidAccessError") {
- testPassed("Closing offline context correctly rejected: " + e);
- } else {
- testFailed("Closing offline context correctly rejected but expected InvalidAccessError, not: " + e);
- }
- }
- ).then(done);
- });
-
- // Task: test offline context (2).
- audit.defineTask('test-offline-context-2', function (done) {
-
- // Try closing again
- offline.close().then(
- function () {
- testFailed("Closing offline context again erroneously resolved");
- },
- function () {
- testPassed("Closing offline context again correctly rejected");
- }
- ).then(
- function () {
-
- // Render the context, and check for a valid state
- offline.oncomplete = function (event) {
- shouldBeEqualToString("event.target.state", "closed");
- done();
- };
- shouldNotThrow("offline.startRendering()");
- }
- );
-
+ shouldBeUndefined("offline.close");
+ done();
});
audit.defineTask('finish-test', function (done) {
@@ -162,14 +126,7 @@
finishJSTest();
});
- audit.runTasks(
- 'test-online-context-1',
- 'test-online-context-2',
- 'test-online-context-3',
- 'test-offline-context-1',
- 'test-offline-context-2',
- 'finish-test'
- );
+ audit.runTasks();
successfullyParsed = true;
</script>

Powered by Google App Engine
This is Rietveld 408576698