WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
91721
[EFL][WK2] Use "load,finished" signal in EWK2UnitTestBase::loadUrlSync() instead of "load,progress"
https://bugs.webkit.org/show_bug.cgi?id=91721
Summary
[EFL][WK2] Use "load,finished" signal in EWK2UnitTestBase::loadUrlSync() inst...
Chris Dumez
Reported
2012-07-19 00:40:54 PDT
The purpose of EWK2UnitTestBase::loadUrlSync() is to load a URL in the view and wait synchronously for the load to finish. The current implementation uses the "load,progress" signal to detect when the load is finished, which is inefficient because it gets emitted several times. It is better to wait for the "load,finished" signal which gets emitted only once when the load is complete.
Attachments
Patch
(3.68 KB, patch)
2012-07-19 00:43 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(3.78 KB, patch)
2012-07-20 01:15 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2012-07-19 00:43:09 PDT
Created
attachment 153197
[details]
Patch
Thiago Marcos P. Santos
Comment 2
2012-07-19 01:44:02 PDT
Comment on
attachment 153197
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=153197&action=review
Good to know that we finally have "load,finished" for EFL WebKit2. :)
> Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:-34 > - UNUSED_PARAM(webView);
It's unclear to me the policy regarding unused parameters at the EFL port. Some reviewers asked me for UNUSED_PARAM a couple of times,. If the policy is not to use, you should also remove <wtf/UnusedParam.h> and, if the policy is to use, you should add for webView and eventInfo.
> Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:-87 > - while (m_loadProgress != 1) > - ecore_main_loop_iterate();
I think we still need to use ecore_main_loop_iterate() with some exit condition (maybe s/m_loadProgress/m_loadDone). The reason is we might call the loadUrlSync from inside a callback. If you do that, you will nest two ecore_main_loop_begin() (that first one will probably starve, but the EFL docs doesn't say anything about it).
> Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:-31 > - void setLoadProgress(float progress) { m_loadProgress = progress; }
You might need a setLoadDone() for the reasons I mentioned at the comment about ecore_main_loop_iterate().
Chris Dumez
Comment 3
2012-07-20 00:54:32 PDT
Comment on
attachment 153197
[details]
Patch Will reupload a patch taking Thiago's feedback into consideration soon. Clearing flags until then.
Chris Dumez
Comment 4
2012-07-20 01:15:48 PDT
Created
attachment 153442
[details]
Patch
Thiago Marcos P. Santos
Comment 5
2012-07-20 01:38:55 PDT
Comment on
attachment 153442
[details]
Patch LGTM. Thanks.
WebKit Review Bot
Comment 6
2012-07-20 03:17:20 PDT
Comment on
attachment 153442
[details]
Patch Clearing flags on attachment: 153442 Committed
r123199
: <
http://trac.webkit.org/changeset/123199
>
WebKit Review Bot
Comment 7
2012-07-20 03:17:26 PDT
All reviewed patches have been landed. Closing bug.
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