Re: [webkit-dev] Can Qt use some of the common DRT code?

2013-02-13 Thread Simon Hausmann
On Monday, February 11, 2013 10:33:03 AM Allan Sandfeld Jensen wrote:
> On Monday 11 February 2013, Benjamin Poulain wrote:
> > One of the differences is the way the Qt port works. Instead of using the
> > JSC binding APIs, it uses its own JS Qt bindings.
> > Would it be possible for Qt to move to the common code? It would make
> > future refactoring easier as there would be one less difference to care
> > about.
> 
> I guess that would be possible, and if you continue to add more testrunner
> methods using continuation passing style, we may need to, since I do not
> think we currently have an easy way to pass a method through the Qt
> bindings.

Yeah, I guess that is a technical argument in favour of switching over.

> That said, Qt has the most convinient interface of all the DRT
> implementations with the bindings automatically derived from the C++
> declarations. I would hate to see that go, and since adding a method to Qt
> DRT is just adding the C++ method and nothing else, it is no worse than
> adding an empty
> implementation to all the ports that are using the common code.

While I agree with you and also appreciate the fact that this implementation 
improves our test coverage for the bindings code a lot, the current "weather" 
in the project on the other hand "suggests" that we better get out of the way 
:(

I'll start working on porting over to the C bindings (bug #109677).

Simon

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Can Qt use some of the common DRT code?

2013-02-11 Thread Allan Sandfeld Jensen
On Monday 11 February 2013, Benjamin Poulain wrote:
> One of the differences is the way the Qt port works. Instead of using the
> JSC binding APIs, it uses its own JS Qt bindings.
> Would it be possible for Qt to move to the common code? It would make
> future refactoring easier as there would be one less difference to care
> about.
> 
I guess that would be possible, and if you continue to add more testrunner 
methods using continuation passing style, we may need to, since I do not think 
we currently have an easy way to pass a method through the Qt bindings.

That said, Qt has the most convinient interface of all the DRT implementations 
with the bindings automatically derived from the C++ declarations. I would 
hate to see that go, and since adding a method to Qt DRT is just adding the 
C++ method and nothing else, it is no worse than adding an empty 
implementation to all the ports that are using the common code. 

`Allan
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Can Qt use some of the common DRT code?

2013-02-10 Thread Benjamin Poulain
On Sun, Feb 10, 2013 at 11:20 PM, Jochen Eisinger wrote:

> I'm not sure I understand. In what cases do you then add something to DRT
> and need to change all of them?
>

Take this for example: http://trac.webkit.org/changeset/130416

It does not make sense to test everything through internals. In some cases,
some test go all the way through the client interfaces, to the WebKit
layer, and then back. It is good such cases are tested through the test
runner and not internals.

Example of such APIs:
-Notification.
-Page Visibility.
-Geolocation.

Internals is awesome, but it is not an excuse to keep DRT in bad shape.

Benjamin
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Can Qt use some of the common DRT code?

2013-02-10 Thread Jochen Eisinger
On Mon, Feb 11, 2013 at 8:19 AM, Benjamin Poulain wrote:

> On Sun, Feb 10, 2013 at 10:56 PM, Jochen Eisinger wrote:
>
>> Today, adding a support for a new function in TestRunner requires
>>> (painfully) changing:
>>> -WebKitTestRunner.
>>> -Common DRT + 6 implementations (Mac, Win, GTK, EFL, WX, Blackberry).
>>> -Chromium DRT.
>>> -Qt DRT.
>>> I think we can do much better. A first step is to have more common code
>>> in DRT.
>>>
>>
>> Another option is to add the new functionality to window.internals, and
>> only change DRT for test code that is port specific or supposed to test a
>> port's WebKit API.
>>
>
> Isn't that what we already do?
> If someone intentionally choose DRT over internals, she/he is courageous :)
>

I'm not sure I understand. In what cases do you then add something to DRT
and need to change all of them?

best
-jochen


>
> Benjamin
>
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Can Qt use some of the common DRT code?

2013-02-10 Thread Benjamin Poulain
On Sun, Feb 10, 2013 at 10:56 PM, Jochen Eisinger wrote:

> Today, adding a support for a new function in TestRunner requires
>> (painfully) changing:
>> -WebKitTestRunner.
>> -Common DRT + 6 implementations (Mac, Win, GTK, EFL, WX, Blackberry).
>> -Chromium DRT.
>> -Qt DRT.
>> I think we can do much better. A first step is to have more common code
>> in DRT.
>>
>
> Another option is to add the new functionality to window.internals, and
> only change DRT for test code that is port specific or supposed to test a
> port's WebKit API.
>

Isn't that what we already do?
If someone intentionally choose DRT over internals, she/he is courageous :)

Benjamin
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Can Qt use some of the common DRT code?

2013-02-10 Thread Jochen Eisinger
On Mon, Feb 11, 2013 at 3:37 AM, Benjamin Poulain wrote:

> Hi,
>
> Today, adding a support for a new function in TestRunner requires
> (painfully) changing:
> -WebKitTestRunner.
> -Common DRT + 6 implementations (Mac, Win, GTK, EFL, WX, Blackberry).
> -Chromium DRT.
> -Qt DRT.
> I think we can do much better. A first step is to have more common code in
> DRT.
>

Another option is to add the new functionality to window.internals, and
only change DRT for test code that is port specific or supposed to test a
port's WebKit API.

best
-jochen


>
> One of the differences is the way the Qt port works. Instead of using the
> JSC binding APIs, it uses its own JS Qt bindings.
> Would it be possible for Qt to move to the common code? It would make
> future refactoring easier as there would be one less difference to care
> about.
>
> Benjamin
>
> ___
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
>
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Can Qt use some of the common DRT code?

2013-02-10 Thread Benjamin Poulain
Hi,

Today, adding a support for a new function in TestRunner requires
(painfully) changing:
-WebKitTestRunner.
-Common DRT + 6 implementations (Mac, Win, GTK, EFL, WX, Blackberry).
-Chromium DRT.
-Qt DRT.
I think we can do much better. A first step is to have more common code in
DRT.

One of the differences is the way the Qt port works. Instead of using the
JSC binding APIs, it uses its own JS Qt bindings.
Would it be possible for Qt to move to the common code? It would make
future refactoring easier as there would be one less difference to care
about.

Benjamin
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev