Bug 92669 - [Qt] load event fires on XMLHttpRequestUpload twice with Qt5
Summary: [Qt] load event fires on XMLHttpRequestUpload twice with Qt5
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Marcelo Lira
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks: 79666
  Show dependency treegraph
 
Reported: 2012-07-30 13:03 PDT by Csaba Osztrogonác
Modified: 2012-09-26 13:10 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.24 KB, patch)
2012-09-26 11:10 PDT, Marcelo Lira
no flags Details | Formatted Diff | Diff
Patch (3.39 KB, patch)
2012-09-26 12:34 PDT, Marcelo Lira
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2012-07-30 13:03:41 PDT
Because of this bug there are two failing tests with Qt5 (WK1 and WK2 too):

--- /storage/WebKit/WebKitBuild/Release/layout-test-results/http/tests/xmlhttprequest/upload-onprogress-event-expected.txt
+++ /storage/WebKit/WebKitBuild/Release/layout-test-results/http/tests/xmlhttprequest/upload-onprogress-event-actual.txt
@@ -2,4 +2,6 @@
 
 PASS: onprogress event fired on XMLHttpRequestUpload.
 onprogress: [object XMLHttpRequestProgressEvent] [Loaded: 4 Total: 4]
+PASS: onprogress event fired on XMLHttpRequestUpload.
+onprogress: [object XMLHttpRequestProgressEvent] [Loaded: 0 Total: 0]

--- /storage/WebKit/WebKitBuild/Release/layout-test-results/http/tests/xmlhttprequest/upload-progress-events-expected.txt
+++ /storage/WebKit/WebKitBuild/Release/layout-test-results/http/tests/xmlhttprequest/upload-progress-events-actual.txt
@@ -3,4 +3,5 @@
 PASS: loadstart event fired on XMLHttpRequestUpload: [object XMLHttpRequestProgressEvent]
 PASS: onprogress event fired on XMLHttpRequestUpload: [object XMLHttpRequestProgressEvent] [Loaded: 4 Total: 4]
 PASS: load event fired on XMLHttpRequestUpload: [object XMLHttpRequestProgressEvent]
+PASS: onprogress event fired on XMLHttpRequestUpload: [object XMLHttpRequestProgressEvent] [Loaded: 0 Total: 0]
Comment 1 Csaba Osztrogonác 2012-07-30 13:26:28 PDT
They are on the qt-5.0/Skipped list. Please unskip them with the proper fix.
Comment 2 Marcelo Lira 2012-09-26 11:10:57 PDT
Created attachment 165836 [details]
Patch
Comment 3 Kenneth Rohde Christiansen 2012-09-26 12:28:57 PDT
Comment on attachment 165836 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=165836&action=review

> Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp:586
> +    if (!bytesTotal)
> +        return;

I would add a comment

if (!bytesTotal) {
    // When finished QNetworkReply emits a progress of 0 bytes.
    // Ignore that, to avoid firing twice.
    return;
}
Comment 4 Marcelo Lira 2012-09-26 12:34:53 PDT
Created attachment 165853 [details]
Patch
Comment 5 WebKit Review Bot 2012-09-26 13:10:00 PDT
Comment on attachment 165853 [details]
Patch

Clearing flags on attachment: 165853

Committed r129692: <http://trac.webkit.org/changeset/129692>
Comment 6 WebKit Review Bot 2012-09-26 13:10:03 PDT
All reviewed patches have been landed.  Closing bug.