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

Unified Diff: LayoutTests/imported/web-platform-tests/FileAPI/blob/Blob-close.html

Issue 1295773004: update-w3c-deps import using blink c936ac9d274f959a4b5908db6835bcd612fb1a9e: (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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: LayoutTests/imported/web-platform-tests/FileAPI/blob/Blob-close.html
diff --git a/LayoutTests/imported/web-platform-tests/FileAPI/blob/Blob-close.html b/LayoutTests/imported/web-platform-tests/FileAPI/blob/Blob-close.html
index 6e70746d8517984415af0c5344364bbeedcaf330..8e54733c3ca58859be1d9092c9d79e6547fb2830 100644
--- a/LayoutTests/imported/web-platform-tests/FileAPI/blob/Blob-close.html
+++ b/LayoutTests/imported/web-platform-tests/FileAPI/blob/Blob-close.html
@@ -11,17 +11,27 @@ test(function() {
var blob = new Blob(["TEST"]);
var sliced = blob.slice();
blob.close();
- test_blob(function() {
- return blob;
- }, {
- expected: "",
- type: "",
- desc: "Blob should be empty."
- });
+
+ async_test(function(t) {
+ var reader = new FileReader();
+
+ reader.onload = t.step_func(function(evt) {
+ assert_unreached("Should not dispatch the load event");
+ });
+
+ reader.onerror = t.step_func(function(e) {
+ assert_equals(reader.result, null);
+ assert_equals(reader.error.code, DOMException.INVALID_STATE_ERR);
+ t.done();
+ });
+
+ reader.readAsText(blob, "UTF-8");
+ }, "Closed Blob");
+
test_blob(function() {
return sliced;
}, {
- expected: "PASS",
+ expected: "TEST",
type: "",
desc: "Slice should still have the data."
});

Powered by Google App Engine
This is Rietveld 408576698