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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/FileAPI/support/Blob.js

Issue 1984023002: Move web-platform-tests to wpt (part 1 of 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 function test_blob(fn, expectations) { 1 function test_blob(fn, expectations) {
2 var expected = expectations.expected, 2 var expected = expectations.expected,
3 type = expectations.type, 3 type = expectations.type,
4 desc = expectations.desc; 4 desc = expectations.desc;
5 5
6 var t = async_test(desc); 6 var t = async_test(desc);
7 t.step(function() { 7 t.step(function() {
8 var blob = fn(); 8 var blob = fn();
9 assert_true(blob instanceof Blob); 9 assert_true(blob instanceof Blob);
10 assert_false(blob instanceof File); 10 assert_false(blob instanceof File);
(...skipping 29 matching lines...) Expand all
40 assert_true(this.result instanceof ArrayBuffer, 40 assert_true(this.result instanceof ArrayBuffer,
41 "Result should be an ArrayBuffer"); 41 "Result should be an ArrayBuffer");
42 assert_array_equals(new Uint8Array(this.result), expected); 42 assert_array_equals(new Uint8Array(this.result), expected);
43 }, fr); 43 }, fr);
44 fr.onerror = t.step_func(function(e) { 44 fr.onerror = t.step_func(function(e) {
45 assert_unreached("got error event on FileReader"); 45 assert_unreached("got error event on FileReader");
46 }); 46 });
47 fr.readAsArrayBuffer(blob); 47 fr.readAsArrayBuffer(blob);
48 }); 48 });
49 } 49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698