RESOLVED FIXED 97808
Chromium: DRT should accept file path as an argument, not just url
https://bugs.webkit.org/show_bug.cgi?id=97808
Summary Chromium: DRT should accept file path as an argument, not just url
Dominic Mazzoni
Reported 2012-09-27 11:55:20 PDT
In the Mac port of DRT, you can give it a path to a test, for example: WebKitBuild/Release/DumpRenderTree LayoutTests/accessibility/textarea-line-for-index.html In the Chromium port, this doesn't work - you have to give it a file:// url: out/Release/DumpRenderTree file:///home/user/.../chrome/src/third_party/WebKit/LayoutTests/accessibility/textarea-line-for-index.html If you do try to pass a file path to the Chromium port of DRT, you get the render tree for the "file not found" page, which isn't at all obvious. Let's just make DRT in Chromium accept a file path as an argument and automatically convert it to a file:// url.
Attachments
Eric Seidel (no email)
Comment 1 2012-10-30 15:52:23 PDT
This is a stupidly annoying bug. Chromium is the odd-man out here.
Dirk Pranke
Comment 2 2012-10-30 15:55:54 PDT
+1.
Eric Seidel (no email)
Comment 3 2012-10-30 16:03:58 PDT
Mac uses NSURL to make this easy: NSURL *url; if ([pathOrURLString hasPrefix:@"http://"] || [pathOrURLString hasPrefix:@"https://"] || [pathOrURLString hasPrefix:@"file://"]) url = [NSURL URLWithString:pathOrURLString]; else url = [NSURL fileURLWithPath:pathOrURLString]; if (!url) { fprintf(stderr, "Failed to parse \"%s\" as a URL\n", pathOrURL.c_str()); return; } It appears we have code to do this, it's just broken: params.testUrl = webkit_support::CreateURLForPathOrURL(command.pathOrURL);
Eric Seidel (no email)
Comment 4 2012-10-30 16:06:07 PDT
Tony Chang
Comment 5 2012-10-30 16:22:01 PDT
I think the problem is just with relative file names. I pass in absolute paths all the time.
Kent Tamura
Comment 6 2012-11-01 00:04:58 PDT
Eric Seidel (no email)
Comment 7 2012-11-01 01:10:04 PDT
Thank you.
Kent Tamura
Comment 8 2012-11-01 20:29:23 PDT
crrev.com/165593 should fix this.
Note You need to log in before you can comment on or make changes to this bug.