WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
168193
REGRESSION(
r212192
): [GTK] Broke downloads API tests
https://bugs.webkit.org/show_bug.cgi?id=168193
Summary
REGRESSION(r212192): [GTK] Broke downloads API tests
Michael Catanzaro
Reported
2017-02-12 11:08:02 PST
Implementing MIMETypeRegistry::getPreferredExtensionForMIMEType in
r212192
broke our downloads API test: TEST: ./Tools/gtk/../../WebKitBuild/Release/bin/TestWebKitAPI/WebKit2Gtk/TestDownloads... (pid=31826) /webkit2/Downloads/local-file: OK /webkit2/Downloads/overwrite-destination-allowed: OK /webkit2/Downloads/overwrite-destination-disallowed: OK /webkit2/Downloads/local-file-error: OK /webkit2/Downloads/remote-file: ** ERROR:../../Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:186:void DownloadTest::checkDestinationAndDeleteFile(WebKitDownload*, const char*): assertion failed (destBasename.get() == expectedName): ("webkit-downloaded-file.pdf" == "webkit-downloaded-file") FAIL I guess it's now expected that the .pdf file extension be added even though it's not included in the server suggested filename, so the change was correct and the test should be updated, right? It seems a bit odd that we would add the file extension on the client side, but I guess that's the expected behavior?
Attachments
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2017-02-12 22:09:56 PST
(In reply to
comment #0
)
> Implementing MIMETypeRegistry::getPreferredExtensionForMIMEType in
r212192
> broke our downloads API test: > > TEST: > ./Tools/gtk/../../WebKitBuild/Release/bin/TestWebKitAPI/WebKit2Gtk/ > TestDownloads... (pid=31826) > > /webkit2/Downloads/local-file: OK > > /webkit2/Downloads/overwrite-destination-allowed: OK > > /webkit2/Downloads/overwrite-destination-disallowed: OK > > /webkit2/Downloads/local-file-error: OK > > /webkit2/Downloads/remote-file: ** > > ERROR:../../Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:186:void > DownloadTest::checkDestinationAndDeleteFile(WebKitDownload*, const char*): > assertion failed (destBasename.get() == expectedName): > ("webkit-downloaded-file.pdf" == "webkit-downloaded-file") > > FAIL > > I guess it's now expected that the .pdf file extension be added even though > it's not included in the server suggested filename, so the change was > correct and the test should be updated, right? It seems a bit odd that we > would add the file extension on the client side, but I guess that's the > expected behavior?
Yes, it's a matter of checking the extension now too. I was going to do it yesterday but was tired, I'll fix this today. It's the suggested filename, it's perfectly ok to suggest a filename with a extension when we know the mime type.
Carlos Garcia Campos
Comment 2
2017-02-14 05:05:08 PST
Committed
r212290
: <
http://trac.webkit.org/changeset/212290
>
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