Index: LayoutTests/fast/files/blob-close.html |
diff --git a/LayoutTests/fast/files/blob-close.html b/LayoutTests/fast/files/blob-close.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..91ab183296056576c589281d7595b8f449a5d748 |
--- /dev/null |
+++ b/LayoutTests/fast/files/blob-close.html |
@@ -0,0 +1,22 @@ |
+<!doctype html> |
+<script src="../../resources/js-test.js"></script> |
+<script src="resources/read-common.js"></script> |
+<script> |
+description("Test the Blob.close() method, basic functionality."); |
+ |
+var blobContents = ['hello']; |
+var blob = new Blob(blobContents); |
+shouldBeTrue("blob instanceof window.Blob"); |
+shouldBe("blob.size", "5"); |
+shouldBe("blob.close(); blob.size", "0"); |
+ |
+blob = new Blob(blobContents, {type: "text/plain"}); |
+shouldBeEqualToString("blob.type", "text/plain"); |
+var sliced1 = blob.slice(2); |
+shouldBe("sliced1.size", "3"); |
+shouldBe("blob.close(); blob.size", "0"); |
+shouldBeEqualToString("blob.type", "text/plain"); |
+shouldBe("sliced1.size", "3"); |
+var sliced2 = sliced1.slice(2); |
+shouldBe("sliced2.size", "1"); |
+</script> |