WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
45349
[GTK] testmimehandling falsely succeeds testing Ogg mime type
https://bugs.webkit.org/show_bug.cgi?id=45349
Summary
[GTK] testmimehandling falsely succeeds testing Ogg mime type
Martin Robinson
Reported
2010-09-07 17:58:19 PDT
At least on my machine (Ubuntu 9.10), testmimehandling falsely succeeds when testing the Ogg file mime type. test_mime_ogg is actually testing the PDF mime type. When I switch the argument it passes from "pdf" to "ogg," the test fails. I uncovered this bug while writing a test for
https://bugs.webkit.org/show_bug.cgi?id=31066
. The failure is: ERROR:../../WebKit/gtk/tests/testmimehandling.c:128:mime_type_policy_decision_requested_cb: assertion failed (mime_type == "audio/ogg"): ("audio/x-vorbis+ogg" == "audio/ogg")
Attachments
proposed patch
(3.49 KB, patch)
2010-09-08 02:42 PDT
,
Philippe Normand
mrobinson
: review-
Details
Formatted Diff
Diff
proposed patch
(4.41 KB, patch)
2010-09-08 09:31 PDT
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
updated patch
(3.36 KB, patch)
2010-09-09 01:04 PDT
,
Philippe Normand
mrobinson
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Philippe Normand
Comment 1
2010-09-08 02:00:19 PDT
"audio/x-vorbis+ogg" is returned by libsoup's content-sniffer (which uses g_content_type_guess and xdgmime underneath). So I think the ResourceHandleSoup should probably handle this case, when "audio/x-vorbis+ogg" is sniffed, it should return "audio/ogg"
Philippe Normand
Comment 2
2010-09-08 02:42:53 PDT
Created
attachment 66862
[details]
proposed patch
Martin Robinson
Comment 3
2010-09-08 08:17:35 PDT
Comment on
attachment 66862
[details]
proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=66862&action=prettypatch
I'm not sure this is the best way to tackle this problem. It doesn't handle the local case. Isn't it possible to fix MediaPlayerGstreamerPrivate to handle this mime type?
> WebCore/platform/network/soup/ResourceHandleSoup.cpp:256 > + GOwnPtr<gchar> mimeType;
It's better to use CString in these cases.
Philippe Normand
Comment 4
2010-09-08 09:31:58 PDT
Created
attachment 66905
[details]
proposed patch
Martin Robinson
Comment 5
2010-09-08 09:54:50 PDT
(In reply to
comment #4
)
> Created an attachment (id=66905) [details] > proposed patch
Sorry, I still don't understand the change to ResourceHandleSoup? If we now support audio/x-vorbis+ogg, why do we have to fake the audio/vorbis mime type there? Can't we just change the expected mime type in the test?
Philippe Normand
Comment 6
2010-09-09 01:04:26 PDT
Created
attachment 67005
[details]
updated patch
Martin Robinson
Comment 7
2010-09-09 07:29:28 PDT
Comment on
attachment 67005
[details]
updated patch View in context:
https://bugs.webkit.org/attachment.cgi?id=67005&action=prettypatch
Excellent!
Philippe Normand
Comment 8
2010-09-09 08:04:26 PDT
Committed
r67086
: <
http://trac.webkit.org/changeset/67086
>
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