WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
63490
[Qt] Add more tests to cover the behavior of loadFinished() signal
https://bugs.webkit.org/show_bug.cgi?id=63490
Summary
[Qt] Add more tests to cover the behavior of loadFinished() signal
Caio Marcelo de Oliveira Filho
Reported
2011-06-27 15:54:33 PDT
[Qt] Add more tests to cover the behavior of loadFinished() signal
Attachments
Patch
(5.73 KB, patch)
2011-06-27 16:04 PDT
,
Caio Marcelo de Oliveira Filho
no flags
Details
Formatted Diff
Diff
Patch
(5.76 KB, patch)
2011-07-19 09:55 PDT
,
Caio Marcelo de Oliveira Filho
no flags
Details
Formatted Diff
Diff
Patch
(6.16 KB, patch)
2011-07-25 07:30 PDT
,
Caio Marcelo de Oliveira Filho
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Caio Marcelo de Oliveira Filho
Comment 1
2011-06-27 16:04:24 PDT
Created
attachment 98809
[details]
Patch
Caio Marcelo de Oliveira Filho
Comment 2
2011-06-27 16:05:42 PDT
This patch was motivated by
bug 61328
, since we needed to keep some functionality that wasn't previously tested.
Alexis Menard (darktears)
Comment 3
2011-06-28 11:05:38 PDT
Comment on
attachment 98809
[details]
Patch LGTM.
Caio Marcelo de Oliveira Filho
Comment 4
2011-07-06 07:25:01 PDT
Robert, Benjamin: could either of you take a look at this one?
Benjamin Poulain
Comment 5
2011-07-07 15:38:00 PDT
Comment on
attachment 98809
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=98809&action=review
The patch looks correct but I am not sure ErrorPage isn't leaked.
> Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp:2579 > + ErrorPage* page = new ErrorPage;
Why is this page allocated on the stack? Isn't it leaked? QWebView::setPage() does not take ownership.
Caio Marcelo de Oliveira Filho
Comment 6
2011-07-19 09:55:00 PDT
Created
attachment 101336
[details]
Patch
Caio Marcelo de Oliveira Filho
Comment 7
2011-07-19 09:56:26 PDT
(In reply to
comment #5
)
> (From update of
attachment 98809
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=98809&action=review
> > The patch looks correct but I am not sure ErrorPage isn't leaked. > > > Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp:2579 > > + ErrorPage* page = new ErrorPage; > > Why is this page allocated on the stack? Isn't it leaked? > QWebView::setPage() does not take ownership.
Yes, it was leaking. Thanks for the catch. Uploaded a new version with that issue fixed. The other tests led me to think that QWebView took the ownership. I'll make a patch to fix them too.
Caio Marcelo de Oliveira Filho
Comment 8
2011-07-19 11:19:24 PDT
(In reply to
comment #7
)
> The other tests led me to think that QWebView took the ownership. I'll make a patch to fix them too.
This is in
bug 64814
.
Benjamin Poulain
Comment 9
2011-07-25 05:18:21 PDT
Comment on
attachment 101336
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=101336&action=review
This looks correct. I did some nitpicking for the sake of it, feel free to cq+ this version if you wish :)
> Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp:2325 > + } else if (request.url() == QUrl("
http://this.will/return-http-404-error-without-contents.html
")) {
It would be nice if "
http://this.will/return-http-404-error-without-contents.html
" was a constant QUrl defined for the whole file instead of copying the string.
> Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp:2326 > + setError(QNetworkReply::ContentNotFoundError, "Not found");
I think the tr() around "Not found" is interesting iff "Not found" is a standard string inside Qt.
Caio Marcelo de Oliveira Filho
Comment 10
2011-07-25 07:30:04 PDT
Created
attachment 101866
[details]
Patch
Caio Marcelo de Oliveira Filho
Comment 11
2011-07-25 07:34:25 PDT
(In reply to
comment #9
)
> > Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp:2325 > > + } else if (request.url() == QUrl("
http://this.will/return-http-404-error-without-contents.html
")) { > > It would be nice if "
http://this.will/return-http-404-error-without-contents.html
" was a constant QUrl defined for the whole file instead of copying the string.
I uploaded a new patch with this implemented. I added the URL as a static const member for FakeReply class.
> > Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp:2326 > > + setError(QNetworkReply::ContentNotFoundError, "Not found"); > > I think the tr() around "Not found" is interesting iff "Not found" is a standard string inside Qt.
I'm not familiar with translation system in Qt, but after digging in the Qt source for a while, I don't think there's a built-in translation for "Not found". Since it isn't something any user will see, I think it's fine to not use tr() here.
WebKit Review Bot
Comment 12
2011-07-25 08:51:31 PDT
Comment on
attachment 101866
[details]
Patch Clearing flags on attachment: 101866 Committed
r91669
: <
http://trac.webkit.org/changeset/91669
>
WebKit Review Bot
Comment 13
2011-07-25 08:51:37 PDT
All reviewed patches have been landed. Closing bug.
Ademar Reis
Comment 14
2011-07-29 08:41:46 PDT
Revision
r91669
cherry-picked into qtwebkit-2.2 with commit 8a95d2b <
http://gitorious.org/webkit/qtwebkit/commit/8a95d2b
>
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