Bug 22037 (QtLauncherRobot) - QtLauncher robotization for testing purposes
Summary: QtLauncher robotization for testing purposes
Status: RESOLVED DUPLICATE of bug 20932
Alias: QtLauncherRobot
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2008-11-02 08:42 PST by Balazs Kelemen
Modified: 2008-12-09 04:02 PST (History)
1 user (show)

See Also:


Attachments
proposed patch (4.88 KB, patch)
2008-11-02 08:46 PST, Balazs Kelemen
hausmann: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kelemen 2008-11-02 08:42:30 PST
I made a feature for QtLauncher: to load URL-s from a list file one by one.
The original goal was leak hunting, but I think it is usable for other testing
purposes or performance measuring as well.
I used the QtWebKit API. The loadFinished signal is the key of the
automatization. The feature can activated by the -r switch. The second parameter
should be the file with one URL at each line.
I hope you can find it useful.
Comment 1 Balazs Kelemen 2008-11-02 08:46:56 PST
Created attachment 24844 [details]
proposed patch
Comment 2 Simon Hausmann 2008-11-05 08:25:35 PST
Comment on attachment 24844 [details]
proposed patch

Is this patch obsolete through bug 20932 ?
Comment 3 Balazs Kelemen 2008-11-05 10:30:37 PST
I thought it would be better if I create a separeted bugreport for the
robotization feature. Where shall I send the new version that follows
your comments in bug 20932? Here or there?
Comment 4 Balazs Kelemen 2008-11-10 02:17:31 PST

*** This bug has been marked as a duplicate of 20932 ***
Comment 5 Simon Hausmann 2008-12-09 02:31:16 PST
Comment on attachment 24844 [details]
proposed patch

> Index: WebKit/qt/ChangeLog
> ===================================================================
> --- WebKit/qt/ChangeLog	(revision 37444)
> +++ WebKit/qt/ChangeLog	(working copy)
> @@ -1,3 +1,24 @@
> +2008-10-09  System User  <set EMAIL_ADDRESS environment variable>

Please add your real name and email address.

> --- WebKit/qt/QtLauncher/QtLauncher.pro	(revision 37432)
> +++ WebKit/qt/QtLauncher/QtLauncher.pro	(working copy)
> @@ -3,6 +3,9 @@ SOURCES += main.cpp
>  CONFIG -= app_bundle
>  CONFIG += uitools
>  DESTDIR = ../../../bin
> +INCPATH += $$PWD/../../../JavaScriptCore/wtf
> +LIBS += -L../../../JavaScriptCore/ 
> +LIBS += -lJavaScriptCore

I don't think we should use the WTF types outside of WebCore, so this should not be necessary.

> +public slots:
> +    void loadNext()
> +    {
> +        QString qstr;
> +        if (getUrl(qstr)) {
> +            QUrl url(qstr, QUrl::StrictMode);
> +            if (url.isValid()) {
> +                m_stdOut<<"Loading "<<qstr<<" ......"<<endl;

Coding style, please put spaces between the arguments.

> +private:
> +    WTF::Vector<QString> m_urls;

I suggest the use of QStringList instead. This way we do not have to have to pull in WTF or the static JavaScriptCore library.

The rest of the patch looks good, heads up :)
Comment 6 Balazs Kelemen 2008-12-09 04:02:32 PST
I finished the patch in bug 20932. Now it uses QVector for the strings.
I'm sorry if I confused yo. I would not create this bugriport.
So, I leave this as a duplicate, and let's continue the discuss at bug 20932!