Bug 37793 - [Chromium] new-run-webkit-tests should use WebKitDriver for --use-drt
Summary: [Chromium] new-run-webkit-tests should use WebKitDriver for --use-drt
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 37645
Blocks: 35902
  Show dependency treegraph
 
Reported: 2010-04-19 01:23 PDT by Kent Tamura
Modified: 2010-04-19 12:14 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.02 KB, patch)
2010-04-19 01:26 PDT, Kent Tamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2010-04-19 01:23:37 PDT
[Chromium] new-run-webkit-tests should use WebKitDriver for --use-drt
Comment 1 Kent Tamura 2010-04-19 01:26:39 PDT
Created attachment 53659 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-04-19 01:29:16 PDT
Comment on attachment 53659 [details]
Patch

User.open_url is probably better than calling webbrowser directly:
http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/system/user.py#L81
it allows us to more easily mock out this code for testing.

This is a rather strange class inversion.  I guess eventually Chromium will be a subclass of WebKitPort.
Comment 3 Eric Seidel (no email) 2010-04-19 01:29:44 PDT
Seems maybe we should have called them TestShellDriver and DumpRenderTreeDriver.
Comment 4 Eric Seidel (no email) 2010-04-19 01:31:02 PDT
Comment on attachment 53659 [details]
Patch

I guess ChromiumPort may not have access to a tool object, which would expose the User() object, so this is probably the best we have for now.
Comment 5 Kent Tamura 2010-04-19 01:41:03 PDT
Comment on attachment 53659 [details]
Patch

Clearing flags on attachment: 53659

Committed r57806: <http://trac.webkit.org/changeset/57806>
Comment 6 Kent Tamura 2010-04-19 01:41:13 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Dirk Pranke 2010-04-19 10:36:40 PDT
(In reply to comment #2)
> (From update of attachment 53659 [details])
> User.open_url is probably better than calling webbrowser directly:
> http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/system/user.py#L81
> it allows us to more easily mock out this code for testing.
> 
> This is a rather strange class inversion.  I guess eventually Chromium will be
> a subclass of WebKitPort.

If this were to become the case, then WebKitPort should probably be merged into port/base.py. It is useful to think of base.py as declaring an interface, but it really is a base class. The only other implementations that wouldn't inherit from WebKitPort would be the testing/mock classes, and they can override whatever they need do.
Comment 8 Eric Seidel (no email) 2010-04-19 12:14:10 PDT
I agree that I think eventually we'll push more code down into base instead of WebKitPort or ChromiumPort.