WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
99904
[chromium] introduce a public API for the TestRunner library
https://bugs.webkit.org/show_bug.cgi?id=99904
Summary
[chromium] introduce a public API for the TestRunner library
jochen
Reported
2012-10-19 21:17:50 PDT
[chromium] introduce a public API for the TestRunner library
Attachments
Patch
(34.93 KB, patch)
2012-10-19 21:19 PDT
,
jochen
no flags
Details
Formatted Diff
Diff
Patch
(50.74 KB, patch)
2012-10-21 01:47 PDT
,
jochen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
jochen
Comment 1
2012-10-19 21:19:46 PDT
Created
attachment 169751
[details]
Patch
Adam Barth
Comment 2
2012-10-19 23:03:14 PDT
Comment on
attachment 169751
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=169751&action=review
> Tools/DumpRenderTree/chromium/TestRunner/public/WebAccessibilityController.h:40 > +class WebAccessibilityController {
How is this going to work in the component build? I assume we're not going to link this into webkit.dll. Does that means we're going to link it into content.dll? Do we need a new TestRunner.dll ?
jochen
Comment 3
2012-10-19 23:16:49 PDT
(In reply to
comment #2
)
> (From update of
attachment 169751
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=169751&action=review
> > > Tools/DumpRenderTree/chromium/TestRunner/public/WebAccessibilityController.h:40 > > +class WebAccessibilityController { > > How is this going to work in the component build? I assume we're not going to link this into webkit.dll. Does that means we're going to link it into content.dll? Do we need a new TestRunner.dll ?
Since it only depends on symbols exported from webkit.dll, I guess it can be directly linked into the content_shell
Adam Barth
Comment 4
2012-10-19 23:20:57 PDT
> Since it only depends on symbols exported from webkit.dll, I guess it can be directly linked into the content_shell
I wonder if it would be better as a separate DLL. That will help make sure the dependencies are clean.
Adam Barth
Comment 5
2012-10-19 23:23:42 PDT
Comment on
attachment 169751
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=169751&action=review
> Tools/DumpRenderTree/chromium/TestRunner/public/WebAccessibilityController.h:36 > +class AccessibilityController; > + > +namespace WebKit {
You might want to take this opportunity to introduce a separate namespace for this library. For example, we could use the namespace TestRunner or WebTestRunner. Using the WebKit namespace isn't quite right because this is outside webkit.dll. Do we want to put the implementation and the API into different namespaces? My gut says that's overkill.
jochen
Comment 6
2012-10-19 23:44:18 PDT
(In reply to
comment #4
)
> > Since it only depends on symbols exported from webkit.dll, I guess it can be directly linked into the content_shell > > I wonder if it would be better as a separate DLL. That will help make sure the dependencies are clean.
I think long term that's definitely desirable. I decided against going there immediately because of Task.h and TestRunner.h that are still directly consumed by DRT.
Adam Barth
Comment 7
2012-10-19 23:55:26 PDT
Makes sense. However, I think we should set up the API in a way that makes that transition easy. For the time being, I think that mostly means using a new namespace and deciding which functions can only be called from "inside" the library (e.g., the WebAccessibilityController(AccessibilityController*) constructor).
jochen
Comment 8
2012-10-21 01:47:09 PDT
Created
attachment 169789
[details]
Patch
jochen
Comment 9
2012-10-21 01:49:54 PDT
I've moved the public API into the namespace WebTestRunner (but of the implementation only the required pieces yet), added a WEBTESTRUNNER_IMPLEMENTATION define, and removed a WTF header ref (wtf/Vector) I also verified that this builds with a component build in chromium
Adam Barth
Comment 10
2012-10-21 15:31:17 PDT
Comment on
attachment 169789
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=169789&action=review
> Tools/DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:128 > + m_internal = new Internal;
We should use WebPrivateOwnPtr here to help us avoid leaking. We still need to call reset manually, but at least there will be an ASSERT if we screw up.
jochen
Comment 11
2012-10-21 19:57:18 PDT
Comment on
attachment 169789
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=169789&action=review
>> Tools/DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:128 >> + m_internal = new Internal; > > We should use WebPrivateOwnPtr here to help us avoid leaking. We still need to call reset manually, but at least there will be an ASSERT if we screw up.
WebPrivateOwnPtr requires WEBKIT_IMPLEMENTATION to be defined in the .cpp file which we don't want.
Adam Barth
Comment 12
2012-10-21 21:30:22 PDT
Good point. We could generalize it, but it's probably not worth it.
WebKit Review Bot
Comment 13
2012-10-21 22:13:52 PDT
Comment on
attachment 169789
[details]
Patch Clearing flags on attachment: 169789 Committed
r132029
: <
http://trac.webkit.org/changeset/132029
>
WebKit Review Bot
Comment 14
2012-10-21 22:13:56 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug