Bug 27138 - LayoutTests/fast/dom/anchor-toString.html is unnecessarily platform-specific
Summary: LayoutTests/fast/dom/anchor-toString.html is unnecessarily platform-specific
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dirk Pranke
URL: http://trac.webkit.org/browser/trunk/...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-09 17:09 PDT by Dirk Pranke
Modified: 2009-07-10 13:27 PDT (History)
2 users (show)

See Also:


Attachments
patch to make test case less platform-specific (1.73 KB, patch)
2009-07-09 17:21 PDT, Dirk Pranke
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Pranke 2009-07-09 17:09:51 PDT
the above test refers to an <a href="/sometestfile.html"> and checks that the resulting toString() produces valid output. If the test is being run over a filesystem, this will translate to "/sometestfile.html" on most unix systems, but on Windows this is actually implementation-dependent, and could legitimately return either "file:///sometestfile.html" or "file://C:/sometestfile.html" (or another drive letter). 

Since this test doesn't really seem to be testing the semantics of relative-URL parsing on file: URLs, I think it makes sense to change it to "http://localhost/sometestfile.html" to get something platform-independent.
Comment 1 Dirk Pranke 2009-07-09 17:21:40 PDT
Created attachment 32541 [details]
patch to make test case less platform-specific
Comment 2 Darin Adler 2009-07-09 17:24:13 PDT
Comment on attachment 32541 [details]
patch to make test case less platform-specific

How exactly is file:/// platform-specific? Are there platforms that don't use file URLs?
Comment 3 Darin Adler 2009-07-09 17:42:30 PDT
Comment on attachment 32541 [details]
patch to make test case less platform-specific

> +                * fast/dom/anchor-toString-expected.txt:
> +        * fast/dom/anchor-toString.html:

Strange indentation here.

r=me

Sorry, I missed the comment explaining what "platform-dependent" meant. I think the comment would have been a lot clearer if it just specifically called out Windows drive letters in URLs as the issue.
Comment 4 Darin Adler 2009-07-09 17:43:09 PDT
(In reply to comment #0)
> Since this test doesn't really seem to be testing the semantics of relative-URL
> parsing on file: URLs

What do you mean about relative-URL parsing? Aren't these absolute URLs?
Comment 5 Dirk Pranke 2009-07-09 17:51:00 PDT
The test case has <a href="/sometestfile.html">, which is a relative URL, not an absolute URL. You are right that the comment probably would've been clearer if I'd just mentioned windows drive letters. Also, the formatting in the changelog was off due to tabs not expanding properly, I think.
Comment 6 Dimitri Glazkov (Google) 2009-07-10 13:27:04 PDT
Landed as http://trac.webkit.org/changeset/45722.