OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="/media-resources/video-test.js"></script> | 4 <script src="/media-resources/video-test.js"></script> |
5 <script src="/media/resources/media-source/webm/segment-info.js"></script> | 5 <script src="/media/resources/media-source/webm/segment-info.js"></script> |
6 <script src="webkitmediasource-util.js"></script> | 6 <script src="webkitmediasource-util.js"></script> |
7 <script> | 7 <script> |
8 var segmentHelper = new MediaSourceTest.SegmentHelper(WebMSegmentInfo.test
WebM); | 8 var segmentHelper = new MediaSourceTest.SegmentHelper(WebMSegmentInfo.test
WebM); |
9 | 9 |
10 // Duration of HTMLMediaElement (i.e., video) changed. | 10 // Duration of HTMLMediaElement (i.e., video) changed. |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 { | 131 { |
132 // Set duration to a negative double, expect error. | 132 // Set duration to a negative double, expect error. |
133 var error = DOMException.INVALID_ACCESS_ERR; | 133 var error = DOMException.INVALID_ACCESS_ERR; |
134 setDurationHelper(-101.9, error, runNextTestCase, video); | 134 setDurationHelper(-101.9, error, runNextTestCase, video); |
135 } | 135 } |
136 | 136 |
137 function testSetPositiveDouble(runNextTestCase, video) | 137 function testSetPositiveDouble(runNextTestCase, video) |
138 { | 138 { |
139 // Set duration to a positive double, expect no errors. | 139 // Set duration to a positive double, expect no errors. |
140 setDurationHelper(101.9, null, runNextTestCase, video); | 140 setDurationHelper(101.9, null, runNextTestCase, video); |
141 endTest(); | |
142 } | 141 } |
143 | 142 |
144 function testSetZero(runNextTestCase, video) | 143 function testSetZero(runNextTestCase, video) |
145 { | 144 { |
146 // Set duration to a positive double, expect no errors. | 145 // Set duration to zero, expect no errors. |
147 setDurationHelper(0, null, runNextTestCase, video); | 146 setDurationHelper(0, null, runNextTestCase, video); |
148 endTest(); | |
149 } | 147 } |
150 | 148 |
151 function start() | 149 function start() |
152 { | 150 { |
153 findMediaElement(); | 151 findMediaElement(); |
154 | 152 |
155 mediaSource = new WebKitMediaSource(); | 153 mediaSource = new WebKitMediaSource(); |
156 | 154 |
157 waitForEventAndFail('error'); | 155 waitForEventAndFail('error'); |
158 waitForEvent('webkitsourceopen', "", false, false, mediaSource); | 156 waitForEvent('webkitsourceopen', "", false, false, mediaSource); |
(...skipping 15 matching lines...) Expand all Loading... |
174 testSetMaxInt, | 172 testSetMaxInt, |
175 testSetMinInt, | 173 testSetMinInt, |
176 testSetMaxValue, | 174 testSetMaxValue, |
177 testSetMaxValueMinusOne, | 175 testSetMaxValueMinusOne, |
178 testSetMinValue, | 176 testSetMinValue, |
179 testSetMinValueMinusOne, | 177 testSetMinValueMinusOne, |
180 testSetPositiveInfinity, | 178 testSetPositiveInfinity, |
181 testSetNegativeInfinity, | 179 testSetNegativeInfinity, |
182 testSetLowestValue, | 180 testSetLowestValue, |
183 testSetNegativeDouble, | 181 testSetNegativeDouble, |
184 testSetPositiveDouble | 182 testSetPositiveDouble, |
| 183 testSetZero |
185 ]; | 184 ]; |
186 MediaSourceTest.startSourceOpenTesting(video, testCases); | 185 MediaSourceTest.startSourceOpenTesting(video, testCases); |
187 }); | 186 }); |
188 } | 187 } |
189 </script> | 188 </script> |
190 </head> | 189 </head> |
191 | 190 |
192 <body onload="start()"> | 191 <body onload="start()"> |
193 <video autoplay controls></video> | 192 <video autoplay controls></video> |
194 <p>Tests boundary values for duration attribute on MediaSource object.</p> | 193 <p>Tests boundary values for duration attribute on MediaSource object.</p> |
195 </body> | 194 </body> |
196 | 195 |
197 </html> | 196 </html> |
OLD | NEW |