Bug 84820 - [BlackBerry] [DRT] Some HTTP tests can't access relative css and/or javascript
Summary: [BlackBerry] [DRT] Some HTTP tests can't access relative css and/or javascript
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-24 20:02 PDT by Xiaobo Wang
Modified: 2013-05-21 20:04 PDT (History)
3 users (show)

See Also:


Attachments
Git patch for bug 84820 (3.08 KB, patch)
2012-04-25 01:18 PDT, Xiaobo Wang
no flags Details | Formatted Diff | Diff
Git patch for bug 84820, updated (3.21 KB, patch)
2012-04-25 02:31 PDT, Xiaobo Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xiaobo Wang 2012-04-24 20:02:49 PDT
[Ported from RIM PR #128626]
For example: LayoutTests/http/tests/local/blob/send-data-blob.html

  1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
  2 <html>
  3 <head>
  4 <link rel="stylesheet"
href="../../../../fast/js/resources/js-test-style.css">
  5 <script src="../../../../fast/js/resources/js-test-pre.js"></script>
  6 </head>
  7 <body>
  8 <p id="description"></p>
  9 <div id="console"></div>
 10 <script src="resources/hybrid-blob-util.js"></script>
 11 <script src="script-tests/send-data-blob.js"></script>
 12 <script src="../../../../fast/js/resources/js-test-post.js"></script>
 13 </body>
 14 </html>

When run this test, js-test-style.css, js-test-pre.js and js-test-post.js are
not accessible because we hacked the root directory of apache server. We are
configuring apache's root directory to LayoutTests/http/tests/local, which
apparently make the resources not accessible.

In WebKit ORWT and NRWT scripts, we run tests under
folder "http/tests/local" with local path (like
"/developer/LayoutTests/http/tests/local/absolute-url-strip-whitespace.html").

However in our porting we run all tests under folder "/http/tests/" as HTTP
tests (http://...). We should fix this.
Comment 1 Xiaobo Wang 2012-04-25 01:18:50 PDT
Created attachment 138757 [details]
Git patch for bug 84820
Comment 2 Nikolas Zimmermann 2012-04-25 01:29:53 PDT
Comment on attachment 138757 [details]
Git patch for bug 84820

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

> Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp:345
> +    return test.lower().substring(0, strlen(httpTestSyntax)) == httpTestSyntax
> +            && test.lower().substring(strlen(httpTestSyntax), strlen(localTestSyntax)) != localTestSyntax;

You could cache test.lower(), and the results of the strlen() calls in local variables. Though as this is a DRT patch, I'll r+ it nevertheless, feel free to make the changes, and reupload a patch or set cq+ on this one.
Comment 3 Xiaobo Wang 2012-04-25 02:31:50 PDT
Created attachment 138767 [details]
Git patch for bug 84820, updated
Comment 4 Xiaobo Wang 2012-04-25 02:34:54 PDT
(In reply to comment #2)
> (From update of attachment 138757 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=138757&action=review
> 
> > Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp:345
> > +    return test.lower().substring(0, strlen(httpTestSyntax)) == httpTestSyntax
> > +            && test.lower().substring(strlen(httpTestSyntax), strlen(localTestSyntax)) != localTestSyntax;
> 
> You could cache test.lower(), and the results of the strlen() calls in local variables. Though as this is a DRT patch, I'll r+ it nevertheless, feel free to make the changes, and reupload a patch or set cq+ on this one.

Thanks Nikolas, changes were made according to your comment and new patch was uploaded.
Comment 5 Nikolas Zimmermann 2012-04-25 03:09:47 PDT
Comment on attachment 138767 [details]
Git patch for bug 84820, updated

Thanks, r=me!
Comment 6 WebKit Review Bot 2012-04-25 04:00:58 PDT
Comment on attachment 138767 [details]
Git patch for bug 84820, updated

Clearing flags on attachment: 138767

Committed r115182: <http://trac.webkit.org/changeset/115182>
Comment 7 Rob Buis 2013-01-04 09:51:49 PST
Landed in r115182, closing.
Comment 8 Rob Buis 2013-01-04 09:52:06 PST
Landed in r115182, closing.
Comment 9 Xiaobo Wang 2013-05-21 20:03:16 PDT
Comment on attachment 138757 [details]
Git patch for bug 84820

Clear r and cq flags for the obsolete patch.
Comment 10 Xiaobo Wang 2013-05-21 20:04:16 PDT
close.