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

Unified Diff: third_party/WebKit/LayoutTests/fast/files/blob-constructor.html

Issue 1896283002: Make Blob constructor's first argument optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update platform-specific expectations Created 4 years, 8 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 | third_party/WebKit/LayoutTests/fast/files/blob-constructor-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/files/blob-constructor.html
diff --git a/third_party/WebKit/LayoutTests/fast/files/blob-constructor.html b/third_party/WebKit/LayoutTests/fast/files/blob-constructor.html
index cdf4684e0fc111eeb9507a10f73dc7ae6a5cd117..c46cd1584516148585fafdaaf07dd8561ebcb52c 100644
--- a/third_party/WebKit/LayoutTests/fast/files/blob-constructor.html
+++ b/third_party/WebKit/LayoutTests/fast/files/blob-constructor.html
@@ -7,6 +7,7 @@ var jsTestIsAsync = true;
// Test the different ways you can construct a Blob.
shouldBeTrue("(new Blob()) instanceof window.Blob");
+shouldBeTrue("(new Blob(undefined)) instanceof window.Blob");
shouldBeTrue("(new Blob([])) instanceof window.Blob");
shouldBeTrue("(new Blob(['hello'])) instanceof window.Blob");
shouldBeTrue("(new Blob(['hello'], {})) instanceof window.Blob");
@@ -14,6 +15,12 @@ shouldBeTrue("(new Blob(['hello'], {type:'text/html'})) instanceof window.Blob")
shouldBeTrue("(new Blob(['hello'], {type:'text/html', endings:'native'})) instanceof window.Blob");
shouldBeTrue("(new Blob(['hello'], {type:'text/html', endings:'transparent'})) instanceof window.Blob");
+// Test default sizes/types.
+shouldBe("(new Blob()).size", "0");
+shouldBe("(new Blob(undefined)).size", "0");
+shouldBeEqualToString("(new Blob()).type", "");
+shouldBeEqualToString("(new Blob(undefined)).type", "");
+
// Test invalid blob parts.
shouldThrow("new Blob('hello')", '"TypeError: Failed to construct \'Blob\': The 1st argument is neither an array, nor does it have indexed properties."');
shouldThrow("new Blob(0)", '"TypeError: Failed to construct \'Blob\': The 1st argument is neither an array, nor does it have indexed properties."');
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/files/blob-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698