WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
176731
Web Inspector: Cleanup and test MIMETypeUtilities
https://bugs.webkit.org/show_bug.cgi?id=176731
Summary
Web Inspector: Cleanup and test MIMETypeUtilities
Joseph Pecoraro
Reported
2017-09-11 14:07:28 PDT
Cleanup and test MIMETypeUtilities • fileExtensionForURL ending in "script.min.js" produces ".min.js" expected ".js" • fileExtensionForMIMEType for "application/vnd.api+json" produces `null` expected "json"
Attachments
[PATCH] Proposed Fix
(11.03 KB, patch)
2017-09-11 14:09 PDT
,
Joseph Pecoraro
mattbaker
: review+
Details
Formatted Diff
Diff
[PATCH] For Landing
(11.38 KB, patch)
2017-09-11 15:45 PDT
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2017-09-11 14:09:18 PDT
Created
attachment 320472
[details]
[PATCH] Proposed Fix
Matt Baker
Comment 2
2017-09-11 15:05:21 PDT
Comment on
attachment 320472
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=320472&action=review
r=me
> LayoutTests/inspector/unit-tests/mimetype-utilities.html:24 > + InspectorTest.expectEqual(WI.fileExtensionForURL("
https://example.com/script.min.js
"), "js", `File extension for "script.min.js" should be "js".`);
Should there also be a test for filenames with a trailing period? I know it's odd but AFAIK it is allowed (on UNIX and Windows at least). Also, WI.fileExtensionForURL("
https://example.com/foo
.") returns "" instead of null. This should probably return null for consistency
Joseph Pecoraro
Comment 3
2017-09-11 15:45:40 PDT
Created
attachment 320491
[details]
[PATCH] For Landing
Joseph Pecoraro
Comment 4
2017-09-11 15:46:07 PDT
> Should there also be a test for filenames with a trailing period? I know > it's odd but AFAIK it is allowed (on UNIX and Windows at least). > > Also, WI.fileExtensionForURL("
https://example.com/foo
.") returns "" instead > of null. This should probably return null for consistency
Sounds good. Added.
WebKit Commit Bot
Comment 5
2017-09-11 16:16:10 PDT
Comment on
attachment 320491
[details]
[PATCH] For Landing Clearing flags on attachment: 320491 Committed
r221891
: <
http://trac.webkit.org/changeset/221891
>
Radar WebKit Bug Importer
Comment 6
2017-09-27 12:34:33 PDT
<
rdar://problem/34693513
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug