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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/mediasource/MediaSource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="/w3c/resources/testharness.js"></script> 4 <script src="/w3c/resources/testharness.js"></script>
5 <script src="/w3c/resources/testharnessreport.js"></script> 5 <script src="/w3c/resources/testharnessreport.js"></script>
6 <script src="mediasource-util.js"></script> 6 <script src="mediasource-util.js"></script>
7 <link rel='stylesheet' href='/w3c/resources/testharness.css'> 7 <link rel='stylesheet' href='/w3c/resources/testharness.css'>
8 </head> 8 </head>
9 <body> 9 <body>
10 <div id="log"></div> 10 <div id="log"></div>
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 test.expectEvent(mediaSource, 'sourceopen', 'Source attached again '); 101 test.expectEvent(mediaSource, 'sourceopen', 'Source attached again ');
102 mediaElement.src = URL.createObjectURL(mediaSource); 102 mediaElement.src = URL.createObjectURL(mediaSource);
103 assert_equals(mediaSource.readyState, 'closed', 'Source closed'); 103 assert_equals(mediaSource.readyState, 'closed', 'Source closed');
104 104
105 test.waitForExpectedEvents(function() 105 test.waitForExpectedEvents(function()
106 { 106 {
107 assert_equals(mediaSource.readyState, 'open', 'Source reopened '); 107 assert_equals(mediaSource.readyState, 'open', 'Source reopened ');
108 test.done(); 108 test.done();
109 }); 109 });
110 }, 'Test that MediaSource can reattach if closed first'); 110 }, 'Test that MediaSource can reattach if closed first');
111
112 mediasource_test(function(test, mediaElement, mediaSource) {
113 assert_equals(mediaSource.readyState, 'open', 'Source open');
114 // Generate two different unique URLs for MediaSource
115 var url1 = URL.createObjectURL(mediaSource);
116 var url2 = URL.createObjectURL(mediaSource);
117 assert_not_equals(url1, url2, 'URLs not unique');
118 // Revoke the first url
119 URL.revokeObjectURL(url1);
120 // And use the second, non-revoked URL to reopen the media source
121 test.expectEvent(mediaSource, 'sourceopen', 'Source reopened');
122 mediaElement.src = url2;
123 assert_equals(mediaSource.readyState, 'closed', 'Source closed');
124 test.waitForExpectedEvents(function()
125 {
126 assert_equals(mediaSource.readyState, 'open', 'Source opened') ;
127 test.done();
128 });
129 }, 'Generate multiple unique URLs via URL.createObjectURL and revoke a n URL');
111 </script> 130 </script>
112 </body> 131 </body>
113 </html> 132 </html>
OLDNEW
« 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