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

Unified Diff: LayoutTests/fast/files/blob-close.html

Issue 157363003: Implement Blob.close(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Avoid warning from PHP's fread() on empty reads Created 6 years, 10 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/files/blob-close-expected.txt » ('j') | Source/core/dom/DOMURL.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c3ae9d9d21572ca27516f7b372c53c909e42e788
--- /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 = buildBlob(blobContents);
+shouldBeTrue("blob instanceof window.Blob");
+shouldBe("blob.size", "5");
+shouldBe("blob.close(); blob.size", "0");
+
+blob = buildBlob(blobContents, "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>
« no previous file with comments | « no previous file | LayoutTests/fast/files/blob-close-expected.txt » ('j') | Source/core/dom/DOMURL.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698