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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-multiple-attach.html

Issue 2133143003: Allow multiple URL.createObjectURL invocations for MediaSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/mediasource/MediaSource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-multiple-attach.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-multiple-attach.html b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-multiple-attach.html
index 6cc7bdc69152409879fb1b8949e00413d587865c..971198a9dbcb526a71bbf8c52b41cee56ddd6d7a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-multiple-attach.html
+++ b/third_party/WebKit/LayoutTests/http/tests/media/media-source/mediasource-multiple-attach.html
@@ -108,6 +108,25 @@
test.done();
});
}, 'Test that MediaSource can reattach if closed first');
+
+ mediasource_test(function(test, mediaElement, mediaSource) {
+ assert_equals(mediaSource.readyState, 'open', 'Source open');
+ // Generate two different unique URLs for MediaSource
+ var url1 = URL.createObjectURL(mediaSource);
+ var url2 = URL.createObjectURL(mediaSource);
+ assert_not_equals(url1, url2, 'URLs not unique');
+ // Revoke the first url
+ URL.revokeObjectURL(url1);
+ // And use the second, non-revoked URL to reopen the media source
+ test.expectEvent(mediaSource, 'sourceopen', 'Source reopened');
+ mediaElement.src = url2;
+ assert_equals(mediaSource.readyState, 'closed', 'Source closed');
+ test.waitForExpectedEvents(function()
+ {
+ assert_equals(mediaSource.readyState, 'open', 'Source opened');
+ test.done();
+ });
+ }, 'Generate multiple unique URLs via URL.createObjectURL and revoke an URL');
</script>
</body>
</html>
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/mediasource/MediaSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698