Bug 95842 - [EFL][WK2] Provide implementation for TestRunner::pathToLocalResource()
Summary: [EFL][WK2] Provide implementation for TestRunner::pathToLocalResource()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks: 61838
  Show dependency treegraph
 
Reported: 2012-09-05 05:23 PDT by Chris Dumez
Modified: 2012-09-05 09:33 PDT (History)
4 users (show)

See Also:


Attachments
Patch (4.29 KB, patch)
2012-09-05 05:34 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2012-09-05 05:23:20 PDT
WK2 EFL WebKitTestRunner currently has a very basic implementation of TestRunner::pathToLocalResource() method (it merely returns the argument).
We need to map /tmp to ${DUMPRENDERTREE_TEMP} envar and /tmp/LayoutTests to ${LOCAL_RESOURCE_ROOT} envar as we do for WK1 EFL DumpRenderTree.

This causes some test cases for fail for WK2-EFL, including:
  fast/dom/frame-loading-via-document-write.html
Comment 1 Chris Dumez 2012-09-05 05:34:48 PDT
Created attachment 162228 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2012-09-05 05:44:29 PDT
Comment on attachment 162228 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=162228&action=review

> Tools/WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp:62
>  JSRetainPtr<JSStringRef> TestRunner::pathToLocalResource(JSStringRef url)
>  {
> -    return url;
> +    String requestedUrl(url->characters(), url->length());

Shouldn't you verify it is local? assert?

> Tools/WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp:66
> +    if (requestedUrl.find("LayoutTests") != notFound) {

Shouldn't it start with it? or is that not needed
Comment 3 Chris Dumez 2012-09-05 05:55:20 PDT
Comment on attachment 162228 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=162228&action=review

>> Tools/WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp:62
>> +    String requestedUrl(url->characters(), url->length());
> 
> Shouldn't you verify it is local? assert?

The function is called pathTo*Local*Resource() so I assumed it was not needed.
FYI, I merely copied the implementation from DumpRenderTree.

>> Tools/WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp:66
>> +    if (requestedUrl.find("LayoutTests") != notFound) {
> 
> Shouldn't it start with it? or is that not needed

Technically, it needs to start with file:///tmp/LayoutTests. This is a copy of the DRT implementation but I can improve it.
Comment 4 WebKit Review Bot 2012-09-05 09:33:28 PDT
Comment on attachment 162228 [details]
Patch

Clearing flags on attachment: 162228

Committed r127602: <http://trac.webkit.org/changeset/127602>
Comment 5 WebKit Review Bot 2012-09-05 09:33:32 PDT
All reviewed patches have been landed.  Closing bug.