[Webkit-unassigned] [Bug 67239] [DRT] Normalize file:///tmp/LayoutTests in LayoutTestController::pathToLocalResource()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 7 16:49:54 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=67239





--- Comment #4 from Jarred Nicholls <jarred at sencha.com>  2011-09-07 16:49:53 PST ---
(In reply to comment #3)
> Historically we have intentionally isolated DumpRenderTree from knowing anything about filesystem layout.
> 
> It would be possible to do this, but we'd need to pass some additional information to DumpRenderTree on the command line.  I'm not sure that's a good idea, given the historical precedent of avoiding telling DRT about the filesystem.
> 
> The approach in bug 67254 is interesting (avoids passing this information to DRT), but also wrong, because it encodes information about WebKit build layout in the DRT executable.

The "static" approach taken in 67254 was not ideal by any means.  Chromium also statically remaps to the root of the source tree, so it was an acceptable stop-gap.  A config file (json, etc.) of "paths to remap" would be the more robust approach going forward incase 1) more than just /tmp/LayoutTests needed to be remapped, and 2) the relative path between LayoutTests and DRT changed (which can obviously be different per port).

> 
> I think the best approach would be to make it possible to generate these file urls from paths relative to the test files themselves.  I'm not sure why the test files don't just use relative paths as-is.

There are some http/security tests that load on a remote http:// origin and try to load file:// assets.  If the pathing was relative then these tests would be compromised; an absolute file:// path is needed.  However, it'd be an interesting idea to translate a relative http:// path to the appropriate absolute file:// path in pathToLocalResource.  But the question of how that path is derived still remains.

I'd be for a configuration file to make the remapping more dynamic.  Any ideas on how to derive a path other than by the location of DRT?  It would only be useful for the remote => local security tests.  All local => local tests could simply be changed to relative paths (some might argue that's compromising some integrity of the test, but it's a bit of a stretch).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list