Summary: | Unit test WebKitDownload | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Christian Dywan <christian> | ||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | Keywords: | Gtk | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Other | ||||||||
OS: | Linux | ||||||||
Attachments: |
|
Description
Christian Dywan
2009-03-26 11:40:57 PDT
Created attachment 28974 [details]
Initial download unit test
This is only a start but it already catches two bugs:
webkit_download_get_progress(download) crashes
webkit_download_get_elapsed_time(download) complains about an invalid timer
Comment on attachment 28974 [details]
Initial download unit test
Thanks.
Created attachment 29163 [details]
Fixes for the crash and critical message detected by the unit tests
accessor functions are called before the download is started.
---
WebKit/gtk/ChangeLog | 15 +++++++++++++++
WebKit/gtk/webkit/webkitdownload.cpp | 6 ++++++
2 files changed, 21 insertions(+), 0 deletions(-)
Comment on attachment 28974 [details]
Initial download unit test
Committed in revision 42153.
Comment on attachment 29163 [details] Fixes for the crash and critical message detected by the unit tests > + Extra checks to avoid crashing and a critical message when > + property accessor functions are called before the download is > + started. Tabs instead of spaces here. > + if (!priv->timer) > + return 0.0; I'd just write "return 0". r=me |