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

Side by Side Diff: LayoutTests/http/tests/media/media-source/mediasource-errors.html

Issue 1159163004: MSE: Speculative fix for flaky mediasource-errors layout test (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Retain the flakiness expectations for this test for now Created 5 years, 6 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 | no next file » | 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 var index = segmentInfo.init.size + (mediaSegment.length - 1) / 2; 152 var index = segmentInfo.init.size + (mediaSegment.length - 1) / 2;
153 // Corrupt the media data from index of mediaData, so it can sig nal 'decode' error. 153 // Corrupt the media data from index of mediaData, so it can sig nal 'decode' error.
154 // Here use mediaSegment to replace the original mediaData[index , index + mediaSegment.length] 154 // Here use mediaSegment to replace the original mediaData[index , index + mediaSegment.length]
155 mediaData.set(mediaSegment, index); 155 mediaData.set(mediaSegment, index);
156 156
157 test.expectEvent(mediaElement, "error", "mediaElement error."); 157 test.expectEvent(mediaElement, "error", "mediaElement error.");
158 sourceBuffer.appendBuffer(mediaData); 158 sourceBuffer.appendBuffer(mediaData);
159 159
160 test.waitForExpectedEvents(function() 160 test.waitForExpectedEvents(function()
161 { 161 {
162 assert_equals(mediaElement.readyState, HTMLMediaElement.HAVE _METADATA);
philipj_slow 2015/06/03 09:30:01 Yeah, this is a very likely cause, there's hardly
163 assert_true(mediaElement.error != null); 162 assert_true(mediaElement.error != null);
164 assert_equals(mediaElement.error.code, MediaError.MEDIA_ERR_ DECODE); 163 assert_equals(mediaElement.error.code, MediaError.MEDIA_ERR_ DECODE);
165 test.done(); 164 test.done();
166 }); 165 });
167 }, "Signaling 'decode' error via segment parser loop algorithm after initialization segment and partial media segment has been appended."); 166 }, "Signaling 'decode' error via segment parser loop algorithm after initialization segment and partial media segment has been appended.");
168 </script> 167 </script>
169 </body> 168 </body>
170 </html> 169 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698