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

Side by Side Diff: LayoutTests/fast/files/blob-close.html

Issue 184473002: Sync Blob.close() behavior wrt updated spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 9 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
« no previous file with comments | « no previous file | LayoutTests/fast/files/blob-close-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <script src="../../resources/js-test.js"></script> 2 <script src="../../resources/js-test.js"></script>
3 <script src="resources/read-common.js"></script> 3 <script src="resources/read-common.js"></script>
4 <script> 4 <script>
5 description("Test the Blob.close() method, basic functionality."); 5 description("Test the Blob.close() method, basic functionality.");
6 6
7 var blobContents = ['hello']; 7 var blobContents = ['hello'];
8 var blob = new Blob(blobContents); 8 var blob = new Blob(blobContents);
9 shouldBeTrue("blob instanceof window.Blob"); 9 shouldBeTrue("blob instanceof window.Blob");
10 shouldBe("blob.size", "5"); 10 shouldBe("blob.size", "5");
11 shouldBe("blob.close(); blob.size", "0"); 11 shouldBe("blob.close(); blob.size", "0");
12 12
13 blob = new Blob(blobContents, {type: "text/plain"}); 13 blob = new Blob(blobContents, {type: "text/plain"});
14 shouldBeEqualToString("blob.type", "text/plain"); 14 shouldBeEqualToString("blob.type", "text/plain");
15 var sliced1 = blob.slice(2); 15 var sliced1 = blob.slice(2);
16 shouldBe("sliced1.size", "3"); 16 shouldBe("sliced1.size", "3");
17 shouldBe("blob.close(); blob.size", "0"); 17 shouldBe("blob.close(); blob.size", "0");
18 shouldBeEqualToString("blob.type", "text/plain"); 18 shouldBeEqualToString("blob.type", "text/plain");
19 shouldBe("sliced1.size", "3"); 19 shouldBe("sliced1.size", "3");
20 var sliced2 = sliced1.slice(2); 20 var sliced2 = sliced1.slice(2);
21 shouldBe("sliced2.size", "1"); 21 shouldBe("sliced2.size", "1");
22 shouldThrow("blob.slice(2)");
23 shouldThrow("blob.close()");
22 </script> 24 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/files/blob-close-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698