Bug 47280 - [Qt] RunLoop implementation for WTR
Summary: [Qt] RunLoop implementation for WTR
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 45393
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-06 10:57 PDT by Balazs Kelemen
Modified: 2010-10-06 16:28 PDT (History)
1 user (show)

See Also:


Attachments
Patch (4.40 KB, patch)
2010-10-06 11:14 PDT, Balazs Kelemen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.