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

Unified Diff: third_party/WebKit/LayoutTests/fast/mediarecorder/BlobEvent-basic.html

Issue 2610163006: MediaRecorder: support |timecode| and remove |m_ignoreMutedMedia|. (Closed)
Patch Set: Rebase video_capture_device_client.cc Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698