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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/FileAPI/support/Blob.js
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/FileAPI/support/Blob.js b/third_party/WebKit/LayoutTests/imported/web-platform-tests/FileAPI/support/Blob.js
deleted file mode 100644
index 1d66f23a6040f37ded99531627d0bc1ebdd9130f..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/FileAPI/support/Blob.js
+++ /dev/null
@@ -1,49 +0,0 @@
-function test_blob(fn, expectations) {
- var expected = expectations.expected,
- type = expectations.type,
- desc = expectations.desc;
-
- var t = async_test(desc);
- t.step(function() {
- var blob = fn();
- assert_true(blob instanceof Blob);
- assert_false(blob instanceof File);
- assert_equals(blob.type, type);
- assert_equals(blob.size, expected.length);
-
- var fr = new FileReader();
- fr.onload = t.step_func_done(function(event) {
- assert_equals(this.result, expected);
- }, fr);
- fr.onerror = t.step_func(function(e) {
- assert_unreached("got error event on FileReader");
- });
- fr.readAsText(blob, "UTF-8");
- });
-}
-
-function test_blob_binary(fn, expectations) {
- var expected = expectations.expected,
- type = expectations.type,
- desc = expectations.desc;
-
- var t = async_test(desc);
- t.step(function() {
- var blob = fn();
- assert_true(blob instanceof Blob);
- assert_false(blob instanceof File);
- assert_equals(blob.type, type);
- assert_equals(blob.size, expected.length);
-
- var fr = new FileReader();
- fr.onload = t.step_func_done(function(event) {
- assert_true(this.result instanceof ArrayBuffer,
- "Result should be an ArrayBuffer");
- assert_array_equals(new Uint8Array(this.result), expected);
- }, fr);
- fr.onerror = t.step_func(function(e) {
- assert_unreached("got error event on FileReader");
- });
- fr.readAsArrayBuffer(blob);
- });
-}

Powered by Google App Engine
This is Rietveld 408576698