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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 7 14:46:52 PDT 2012


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





--- Comment #8 from Joshua Lock <joshua.lock at intel.com>  2012-06-07 14:46:51 PST ---
(From update of attachment 145798)
View in context: https://bugs.webkit.org/attachment.cgi?id=145798&action=review

>> Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp:181
>> +static inline String stringFromJSString(JSStringRef jsString)
> 
> Some nitpicking: have you tried operating on the UString returned by JSStringRef::ustring()? It has find() and substringSharingImpl(), so adding this method may be unnecessary.

I have not, I looked to other LayoutController* for inspiration. Will have a go with ustring() now, I'd much prefer not to add extra methods - thanks for the hint.

>> Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp:212
>> +    }
> 
> The code to calculate the index of the separator seems to be duplicated in each case. What if you do something like
>   if (requestedUrl.find("LayoutTests") != notFound) {
>       requestedRoot = "/tmp/LayoutTests";
>       resourceRoot = getenv("LOCAL_RESOURCE_ROOT");
>   } else if (...) {
>       requestedRoot = "/tmp";
>       resourceRoot = getenv("DUMPRENDERTREE_TEMP");
>   } else
>       ASSERT_NOT_REACHED(); // via mac's LTC.mm
> 
>   // calculate separator index here

Much nicer, will do.

-- 
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