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

Issue 1362963003: Blob/File constructors/slice method shouldn't throw on invalid types (Closed)

Created:
5 years, 3 months ago by jsbell
Modified:
3 years, 9 months ago
Reviewers:
kinuko
CC:
chromium-reviews, kinuko+fileapi, nhiroki, tfarina, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Blob/File constructors/slice method shouldn't throw on invalid types Per spec[1] and tests[2] the constructors for Blob and File and their slice() methods should not throw if non-printable-ASCII type is supplied; instead it should use "" as the type. In addition, the type should be consistently lower-cased, by both the constructors and slice() method. [1] https://w3c.github.io/FileAPI/ [2] https://github.com/w3c/web-platform-tests/tree/master/FileAPI BUG=509786 R=kinuko@chromium.org Review-Url: https://codereview.chromium.org/1362963003 Cr-Commit-Position: refs/heads/master@{#455965} Committed: https://chromium.googlesource.com/chromium/src/+/0b46f3a24bf36d7cf91ec2d88132d15563b85d0e

Patch Set 1 #

Patch Set 2 : Implement MIME parsing utility #

Patch Set 3 : Update tests/results #

Patch Set 4 : Platforms, how do they work? #

Patch Set 5 : Rebased #

Patch Set 6 : Rebased #

Patch Set 7 : add fuzzer #

Patch Set 8 : Rebased - note new failures #

Patch Set 9 : Scope down to matching other browsers and WPT #

Patch Set 10 : Rebased #

Total comments: 2

Patch Set 11 : Update comment with more context, per review feedback #

Patch Set 12 : Updated win expectation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -171 lines) Patch
M third_party/WebKit/LayoutTests/external/wpt/FileAPI/blob/Blob-constructor-expected.txt View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -5 lines 0 comments Download
D third_party/WebKit/LayoutTests/external/wpt/FileAPI/blob/Blob-slice-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -131 lines 0 comments Download
M third_party/WebKit/LayoutTests/external/wpt/FileAPI/file/File-constructor-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/files/blob-constructor.html View 1 2 3 4 5 6 7 8 9 2 chunks +13 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/files/blob-constructor-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/files/blob-slice-type.html View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/files/file-constructor.html View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/files/file-constructor-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/post-blob-content-type-async-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/post-blob-content-type-sync-expected.txt View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/post-blob-content-type-tests.js View 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/external/wpt/FileAPI/blob/Blob-constructor-expected.txt View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/external/wpt/FileAPI/blob/Blob-constructor-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/fileapi/Blob.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fileapi/Blob.cpp View 1 2 3 4 5 6 7 8 9 10 4 chunks +23 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/fileapi/File.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +2 lines, -7 lines 0 comments Download

Messages

Total messages: 34 (22 generated)
jsbell
migrated from https://codereview.chromium.org/1235213004/
5 years, 3 months ago (2015-09-23 17:33:52 UTC) #1
kinuko
lgtm
5 years, 3 months ago (2015-09-24 05:52:44 UTC) #2
jsbell
FYI, holding on this since I discovered that the spec allows invalid types but then ...
5 years, 3 months ago (2015-09-24 16:51:24 UTC) #3
jsbell
+mkwst Ostensibly this is correct - added a new MIMEUtils file/namespace to implement the MIMESNIFF ...
5 years, 2 months ago (2015-10-05 21:29:48 UTC) #5
Mike West
The changes to the layout tests look pretty reasonable to me. I don't think I ...
5 years, 2 months ago (2015-10-06 07:14:17 UTC) #6
kinuko
On 2015/10/06 07:14:17, Mike West (slow) wrote: > The changes to the layout tests look ...
5 years, 2 months ago (2015-10-06 07:53:03 UTC) #7
jsbell
Don't worry about reviewing this at this time - I'm still not sure where I ...
5 years, 2 months ago (2015-10-06 16:08:59 UTC) #8
jsbell
Okay, latest iteration rips out the "parsable mime type" checks. It just enforces U+0020...U+007E (yielding ...
3 years, 11 months ago (2017-01-04 20:51:07 UTC) #18
kinuko
On 2017/01/04 20:51:07, jsbell wrote: > Okay, latest iteration rips out the "parsable mime type" ...
3 years, 9 months ago (2017-03-08 06:13:39 UTC) #26
jsbell
On 2017/03/08 06:13:39, kinuko wrote: > Sorry I just realized you were asking me. lgtm ...
3 years, 9 months ago (2017-03-10 01:04:35 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1362963003/220001
3 years, 9 months ago (2017-03-10 01:05:12 UTC) #30
commit-bot: I haz the power
3 years, 9 months ago (2017-03-10 02:54:01 UTC) #34
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/0b46f3a24bf36d7cf91ec2d88132...

Powered by Google App Engine
This is Rietveld 408576698