Bug 27512

Summary: Test for QWebFrame::hasSetFocus() is trying to use a not defined resource.
Product: WebKit Reporter: Andre Pedralho <apedralho>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: hausmann, tonikitoo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Copied resources from qwebpage tests and added the references to the qwebframe.qrc.
manyoso: review-
Using setHtml methods to define the test web page instead of external resources.
none
Using QSignalSpy to control whether a load finished signal has been emited instead of just wait for some miliseconds. hausmann: review+

Andre Pedralho
Reported 2009-07-21 13:18:27 PDT
There is no frametest folder and qwebframe.qrc does not specify where to find it. tst_qwebframe.cpp: void tst_QWebFrame::hasSetFocus() { (...) QUrl url = QUrl("qrc:///frametest/iframe.html"); _page->mainFrame()->load(url); (...) } qwebframe.qrc: <!DOCTYPE RCC><RCC version="1.0"> <qresource prefix="/"> <file>image.png</file> <file>style.css</file> </qresource> </RCC>
Attachments
Copied resources from qwebpage tests and added the references to the qwebframe.qrc. (2.31 KB, patch)
2009-07-21 13:38 PDT, Andre Pedralho
manyoso: review-
Using setHtml methods to define the test web page instead of external resources. (2.70 KB, patch)
2009-07-24 07:48 PDT, Andre Pedralho
no flags
Using QSignalSpy to control whether a load finished signal has been emited instead of just wait for some miliseconds. (2.42 KB, patch)
2009-07-27 11:39 PDT, Andre Pedralho
hausmann: review+
Andre Pedralho
Comment 1 2009-07-21 13:38:14 PDT
Created attachment 33207 [details] Copied resources from qwebpage tests and added the references to the qwebframe.qrc.
Antonio Gomes
Comment 2 2009-07-21 13:51:37 PDT
we are duping the resources used in qwebframe and qwebpage. should not we make them to share the resource ?
Adam Treat
Comment 3 2009-07-22 06:35:39 PDT
Comment on attachment 33207 [details] Copied resources from qwebpage tests and added the references to the qwebframe.qrc. As tonikitoo pointed out, we shouldn't dupe the resources, but rather share them.
Andre Pedralho
Comment 4 2009-07-22 11:06:42 PDT
(In reply to comment #3) > (From update of attachment 33207 [details]) > As tonikitoo pointed out, we shouldn't dupe the resources, but rather share > them. Agree with that, however "the listed resource files must be located in the same directory as the .qrc file, or one of its subdirectories" according to the Qt resources docs. As there are two different directories to QWebFrame and to QWebPage tests the only way to share the resources would be to have a pool of resources in WebKit/qt/tests/'resources'/ with the qrc files related to both tests. I mean: ls WebKit/qt/tests/: benchmarks qwebelement qwebframe (...) qwebpage qwebview RESOURCES tests.pro ls WebKit/qt/tests/resources: FRAMETEST image.png qwebframe.qrc style.css tst_qwebpage.qrc IMHO, the best solution here is to create separated resources to each tests, maybe duplicating it.
Andre Pedralho
Comment 5 2009-07-23 06:06:21 PDT
Hausmann, we need your opinion to find the best solution here. Can you help us?
Simon Hausmann
Comment 6 2009-07-23 13:26:01 PDT
Hmmm, another option, potentially simpler, would be to replace the use of the resources for html with data urls. What do you think?
Antonio Gomes
Comment 7 2009-07-23 13:30:47 PDT
simon, he has done so for this renderContents removal patch (not uploaded yet) ... and it looks pretty nice. and it would work here too, imho ps: we should "invalid" this one instead of mark as "fixed" ?
Andre Pedralho
Comment 8 2009-07-24 07:46:45 PDT
Reopening as the bug itself still there and might be fixed with the solution proposed in comment #6.
Andre Pedralho
Comment 9 2009-07-24 07:48:24 PDT
Created attachment 33445 [details] Using setHtml methods to define the test web page instead of external resources.
Andre Pedralho
Comment 10 2009-07-27 11:39:18 PDT
Created attachment 33560 [details] Using QSignalSpy to control whether a load finished signal has been emited instead of just wait for some miliseconds. Marking old patch obsolete as per suggestions in IRC.
Simon Hausmann
Comment 11 2009-07-28 06:01:54 PDT
Comment on attachment 33560 [details] Using QSignalSpy to control whether a load finished signal has been emited instead of just wait for some miliseconds. r=me. Thanks
Simon Hausmann
Comment 12 2009-07-28 06:04:51 PDT
Landed in r46475
Note You need to log in before you can comment on or make changes to this bug.