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

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

Issue 1354863002: MediaRecorder: Adding BlobEvent and connecting it in MediaRecorderHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: BlobEvent in global-interface-listing-expected.txt, and rebase Created 5 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/fast/mediarecorder/MediaRecorder-basic-video.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/mediarecorder/BlobEvent-basic.html
diff --git a/LayoutTests/fast/mediarecorder/BlobEvent-basic.html b/LayoutTests/fast/mediarecorder/BlobEvent-basic.html
new file mode 100644
index 0000000000000000000000000000000000000000..64e9f8049040f07c5f5f575cb6a31b570f3acefb
--- /dev/null
+++ b/LayoutTests/fast/mediarecorder/BlobEvent-basic.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<script src=../../resources/testharness.js></script>
+<script src=../../resources/testharnessreport.js></script>
+<script>
+
+test(function() {
+ var array = new Uint8Array([0x70, 0x71, 0x72, 0x73]);
+ var blob = new Blob([array]);
+ var blobEvent = new BlobEvent('BlobEvent', {data : blob});
+
+ var reader = new FileReader();
+ reader.addEventListener("loadend", function() {
+ // |reader.result| contains the contents of blob as an ArrayBuffer.
+ var outputArray = new Uint8Array(reader.result);
+ assert_equals(array.length, outputArray.length);
+ for (var index in outputArray) {
+ assert_equals(array[index], outputArray[index]);
+ }
+ });
+ reader.readAsArrayBuffer(blob);
+
+}, 'check BlobEvent creation and content management');
+
+
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/mediarecorder/MediaRecorder-basic-video.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698