| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>MediaStream Recoder Browser Test (w/ MediaSource)</title> | 4 <title>MediaStream Recoder Browser Test (w/ MediaSource)</title> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <div> Record Real-Time video content browser test.</div> | 7 <div> Record Real-Time video content browser test.</div> |
| 8 <video id="video" autoplay></video> | 8 <video id="video" autoplay></video> |
| 9 </body> | 9 </body> |
| 10 <script type="text/javascript" src="mediarecorder_test_utils.js"></script> | 10 <script type="text/javascript" src="mediarecorder_test_utils.js"></script> |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 emptyBlobs += 1; | 147 emptyBlobs += 1; |
| 148 }; | 148 }; |
| 149 }) | 149 }) |
| 150 .then(function() { | 150 .then(function() { |
| 151 return waitFor('Making sure the recording has data', | 151 return waitFor('Making sure the recording has data', |
| 152 function() { | 152 function() { |
| 153 return videoSize > 0 && timeStamps.length > 10; | 153 return videoSize > 0 && timeStamps.length > 10; |
| 154 }); | 154 }); |
| 155 }) | 155 }) |
| 156 .then(function() { | 156 .then(function() { |
| 157 var timeDeltas = getTimeStampDeltas(timeStamps); | |
| 158 timeDeltas.forEach(function(timeDelta) { | |
| 159 assertTrue(timeDelta >= DEFAULT_TIME_SLICE, 'A time slice was ' + | |
| 160 timeDelta + ' ms which is shorter than the expected minimum ' | |
| 161 + DEFAULT_TIME_SLICE + 'ms'); | |
| 162 }); | |
| 163 assertTrue(emptyBlobs == 0, 'Recording has ' + emptyBlobs + | 157 assertTrue(emptyBlobs == 0, 'Recording has ' + emptyBlobs + |
| 164 ' empty blobs, there should be no such empty blobs.'); | 158 ' empty blobs, there should be no such empty blobs.'); |
| 165 }) | 159 }) |
| 166 .catch(function(err) { | 160 .catch(function(err) { |
| 167 return failTest(err.toString()); | 161 return failTest(err.toString()); |
| 168 }) | 162 }) |
| 169 .then(function() { | 163 .then(function() { |
| 170 reportTestSuccess(); | 164 reportTestSuccess(); |
| 171 }); | 165 }); |
| 172 } | 166 } |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 return failTest(err.toString()); | 339 return failTest(err.toString()); |
| 346 }) | 340 }) |
| 347 .then(function() { | 341 .then(function() { |
| 348 reportTestSuccess(); | 342 reportTestSuccess(); |
| 349 }); | 343 }); |
| 350 } | 344 } |
| 351 | 345 |
| 352 </script> | 346 </script> |
| 353 </body> | 347 </body> |
| 354 </html> | 348 </html> |
| OLD | NEW |