[webkit-dev] Should we move methods from layoutTestController/etc... to internals?
darin at apple.com
Tue Feb 21 14:39:55 PST 2012
On Feb 21, 2012, at 12:15 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> It appears to me window.internals is a superior solution to expose cross-platform features to our test harness compared to other interfaces implemented in DumpRenderTree and WebKitTestRunner such as layoutTestController and friends.
Pros for internals:
- Cross-platform; only has to be done once rather than once per platform.
- Separate library is a good technique to keep the test code out of production builds.
Cons for internals:
- Tests only WebCore, not the platform-specific WebKit API/SPI layer.
- Requires a copy of the internals library that is identically versioned with the WebCore library being tested.
- Not suitable for control of the testing machinery itself.
> Should we try to move methods of layoutTestController and friends that expose WebCore-level features to internals?
We should move functions or attributes on layoutTestController that are not about control of testing, but simply about exposure of internals to be tested.
We should not move functions or attributes that are about controlling the test machinery nor should we necessarily move test harnesses such as eventSender.
Also, there are some functions and attributes that helpfully test WebKit in addition to WebCore. While those don’t really belong on a “test controller” object, moving them to internals would remove the testing of WebKit. We can think more on what to do about those. It is a little unfortunate that this helpful direction is likely to make us test WebCore more thoroughly at the cost of losing test coverage for the WebKit layer.
More information about the webkit-dev