[webkit-qt] Please refrain from using qWait() or other timeouts in QtWebKit autotests

Andreas Kling andreas.kling at nokia.com
Tue Feb 22 09:30:11 PST 2011


My bestest folkatrons,

Using timers makes tests slow and flaky at best, since there's no proper 
guarantee that the load has finished (or whatever you were waiting for) 
after 2000 milliseconds.

Make use of QTest::qWaitForWindowShown(), loadFinished() signals, etc, 
to avoid having your tests waiting unnecessarily long (or not long enough!)

This has been discussed before, but I see new tests creeping into trunk 
with qWait(this) and QTimer::singleShot(that), so I think it's worth 
reiterating.

Thanks for listening,
-Kling


More information about the webkit-qt mailing list