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

Unified Diff: LayoutTests/fast/files/file-constructor.html

Issue 1235213004: Blob/File constructors/slice method shouldn't throw on invalid types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove debugging spew Created 5 years, 5 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/fast/files/file-constructor.html
diff --git a/LayoutTests/fast/files/file-constructor.html b/LayoutTests/fast/files/file-constructor.html
index f634db7d7750c47089f34b20d8028339ac706848..74b91722bcfc48beec933210ac62bcb919c27d9c 100644
--- a/LayoutTests/fast/files/file-constructor.html
+++ b/LayoutTests/fast/files/file-constructor.html
@@ -69,7 +69,12 @@ shouldBeTrue("(new File([], 'world.html', {unknownKey:'value'})) instanceof wind
shouldThrow("new File([], 'world.html', {endings:'illegalValue'})", "'TypeError: Failed to construct \\'File\\': The provided value \\'illegalValue\\' is not a valid enum value of type NormalizeLineEndings.'");
shouldThrow("new File([], 'world.html', {endings:throwingObj})", "'Error'");
shouldThrow("new File([], 'world.html', {type:throwingObj})", "'Error'");
-shouldThrow("new File([], 'world.html', {type:'hello\u00EE'})", "'SyntaxError: Failed to construct \\'File\\': The \\'type\\' property must consist of ASCII characters.'");
+
+// Test non-ASCII type handling
+shouldBeEqualToString("new File([], 'world.html', {type:'hello\u00EE'}).type", "");
+
+// Test lowercasing of type
+shouldBeEqualToString("new File([], 'world.html', {type:'123ABCabc'}).type", "123abcabc");
// Test various non-object literals being used as property bags.
shouldBeTrue("(new File([], 'world.html', null)) instanceof window.File");
« no previous file with comments | « LayoutTests/fast/files/blob-constructor-expected.txt ('k') | LayoutTests/fast/files/file-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698