| Index: third_party/WebKit/LayoutTests/fast/mediarecorder/BlobEvent-basic.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/mediarecorder/BlobEvent-basic.html b/third_party/WebKit/LayoutTests/fast/mediarecorder/BlobEvent-basic.html
|
| index ea0b3775310795e102f233032e6a5c2f895ba50e..7774df7c3f0feb458cfe7003a761d6486a089414 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/mediarecorder/BlobEvent-basic.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/mediarecorder/BlobEvent-basic.html
|
| @@ -14,20 +14,42 @@ test(function() {
|
| var outputArray = new Uint8Array(reader.result);
|
| assert_array_equals(array, outputArray)
|
| });
|
| - reader.readAsArrayBuffer(blob);
|
| + reader.readAsArrayBuffer(blobEvent.data);
|
| + assert_equals(blobEvent.timecode, NaN, 'timecode');
|
|
|
| -}, 'check BlobEvent creation and content management');
|
| +}, 'BlobEvent creation and content management');
|
| +
|
| +test(function() {
|
| + var array = new Uint8Array([0x70, 0x71, 0x72, 0x73]);
|
| + var blob = new Blob([array]);
|
| + var now = Date.now();
|
| + var blobEvent = new BlobEvent('BlobEvent', {data : blob, timecode : now});
|
| +
|
| + assert_equals(blobEvent.timecode, now, 'timecode');
|
| +
|
| +}, 'BlobEvent creation with timecode');
|
|
|
| test(function() {
|
| assert_throws(null,
|
| function() { var blobEvent = new BlobEvent('BlobEvent'); });
|
| -}, 'check BlobEvent needs two constructor parameters, type and BlobEventInit');
|
| +}, 'BlobEvent needs two constructor parameters, type and BlobEventInit');
|
|
|
| test(function() {
|
| + var array = new Uint8Array([0x70, 0x71, 0x72, 0x73]);
|
| + var blob = new Blob([array]);
|
| + assert_throws(null,
|
| + function() {
|
| + var blobEvent = new BlobEvent(blob, {data : "blergh"});
|
| + });
|
| +}, 'BlobEvent needs the second constructor parameter to be a BlobEventInit');
|
| +
|
| +test(function() {
|
| + var array = new Uint8Array([0x70, 0x71, 0x72, 0x73]);
|
| + var blob = new Blob([array]);
|
| assert_throws(null,
|
| function() {
|
| - var blobEvent = new BlobEvent('BlobEvent', {data : "blergh"});
|
| + var blobEvent = new BlobEvent(blob, {timecode : 0.0});
|
| });
|
| -}, 'check BlobEvent needs the second constructor parameter to be a BlobEventInit');
|
| +}, 'BlobEventInit needs a data parameter');
|
|
|
| </script>
|
|
|