OLD | NEW |
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 sourceBuffer.abort(); | 122 sourceBuffer.abort(); |
123 | 123 |
124 assert_false(sourceBuffer.updating, "updating"); | 124 assert_false(sourceBuffer.updating, "updating"); |
125 | 125 |
126 test.waitForExpectedEvents(function() | 126 test.waitForExpectedEvents(function() |
127 { | 127 { |
128 test.done(); | 128 test.done(); |
129 }); | 129 }); |
130 }, "Test aborting a remove operation."); | 130 }, "Test aborting a remove operation."); |
131 | 131 |
| 132 mediasource_testafterdataloaded(function(test, mediaElement, mediaSour
ce, segmentInfo, sourceBuffer, mediaData) |
| 133 { |
| 134 sourceBuffer.appendBuffer(mediaData); |
| 135 |
| 136 test.expectEvent(sourceBuffer, "updatestart"); |
| 137 test.expectEvent(sourceBuffer, "update"); |
| 138 test.expectEvent(sourceBuffer, "updateend"); |
| 139 |
| 140 test.waitForExpectedEvents(function() |
| 141 { |
| 142 assert_less_than(mediaSource.duration, 10) |
| 143 |
| 144 mediaSource.duration = 10; |
| 145 |
| 146 sourceBuffer.remove(mediaSource.duration, mediaSource.duration
+ 2); |
| 147 |
| 148 assert_true(sourceBuffer.updating, "updating"); |
| 149 test.expectEvent(sourceBuffer, "updatestart"); |
| 150 test.expectEvent(sourceBuffer, "update"); |
| 151 test.expectEvent(sourceBuffer, "updateend"); |
| 152 }); |
| 153 |
| 154 test.waitForExpectedEvents(function() |
| 155 { |
| 156 test.done(); |
| 157 }); |
| 158 |
| 159 }, "Test remove with a start at the duration."); |
132 | 160 |
133 mediasource_testafterdataloaded(function(test, mediaElement, mediaSour
ce, segmentInfo, sourceBuffer, mediaData) | 161 mediasource_testafterdataloaded(function(test, mediaElement, mediaSour
ce, segmentInfo, sourceBuffer, mediaData) |
134 { | 162 { |
135 test.expectEvent(sourceBuffer, "updatestart"); | 163 test.expectEvent(sourceBuffer, "updatestart"); |
136 test.expectEvent(sourceBuffer, "update"); | 164 test.expectEvent(sourceBuffer, "update"); |
137 test.expectEvent(sourceBuffer, "updateend"); | 165 test.expectEvent(sourceBuffer, "updateend"); |
138 sourceBuffer.appendBuffer(mediaData); | 166 sourceBuffer.appendBuffer(mediaData); |
139 | 167 |
140 test.waitForExpectedEvents(function() | 168 test.waitForExpectedEvents(function() |
141 { | 169 { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 mp4: "{ [0.000, 1.022) }", | 260 mp4: "{ [0.000, 1.022) }", |
233 }; | 261 }; |
234 | 262 |
235 // Using MAX_VALUE rather than POSITIVE_INFINITY here due to lack | 263 // Using MAX_VALUE rather than POSITIVE_INFINITY here due to lack |
236 // of 'unrestricted' on end parameter. (See comment in SourceBuffe
r.idl) | 264 // of 'unrestricted' on end parameter. (See comment in SourceBuffe
r.idl) |
237 removeAndCheckBufferedRanges(test, sourceBuffer, 1, Number.MAX_VAL
UE, expectations[subType]); | 265 removeAndCheckBufferedRanges(test, sourceBuffer, 1, Number.MAX_VAL
UE, expectations[subType]); |
238 }, "Test removing the end of appended data."); | 266 }, "Test removing the end of appended data."); |
239 </script> | 267 </script> |
240 </body> | 268 </body> |
241 </html> | 269 </html> |
OLD | NEW |