Bug 47280

Summary: [Qt] RunLoop implementation for WTR
Product: WebKit Reporter: Balazs Kelemen <kbalazs>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abecsi
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Bug Depends on: 45393    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Balazs Kelemen 2010-10-06 10:57:31 PDT
WTR needs a runloop for being functional. WTR is a little bit tricky because the event loop
is allowed to run only while we are in the TestController::runUntil. While we are
in the event loop we must check a global variable and stop the loop when it is becoming true.
Our friend will be QEventLoop!
Comment 1 Balazs Kelemen 2010-10-06 11:14:28 PDT
Created attachment 69963 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2010-10-06 11:20:19 PDT
Comment on attachment 69963 [details]
Patch

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

> WebKitTools/WebKitTestRunner/qt/TestControllerQt.cpp:38
> +class RunUntilLoop : public QObject {

Run until what? a condition? RunSingle?

> WebKitTools/WebKitTestRunner/qt/TestControllerQt.cpp:42
> +    static void start(bool& done)

ah seems to be a condition, I guess RunUntilConditionLoop would be a better name.

> WebKitTools/WebKitTestRunner/qt/main.cpp:51
> +        m_controller = new WTR::TestController(m_argc, const_cast<const char**>(m_argv));

leaking m_controller?
Comment 3 Balazs Kelemen 2010-10-06 14:54:45 PDT
> 
> > WebKitTools/WebKitTestRunner/qt/main.cpp:51
> > +        m_controller = new WTR::TestController(m_argc, const_cast<const char**>(m_argv));
> 
> leaking m_controller?

No, it is deleted in the destructor :)
Comment 4 Balazs Kelemen 2010-10-06 14:56:04 PDT
I will do the renaming before commit.
Comment 5 Balazs Kelemen 2010-10-06 14:59:03 PDT
Could not be committed before the dependency lands.
Comment 6 Andras Becsi 2010-10-06 16:28:39 PDT
Comment on attachment 69963 [details]
Patch

Clearing flags on attachment: 69963

Committed r69253: <http://trac.webkit.org/changeset/69253>
Comment 7 Andras Becsi 2010-10-06 16:28:47 PDT
All reviewed patches have been landed.  Closing bug.