Bug 75823

Summary: background position parsing test for CSS3 calc
Product: WebKit Reporter: Mike Lawther <mikelawther>
Component: New BugsAssignee: Mike Lawther <mikelawther>
Status: RESOLVED FIXED    
Severity: Normal CC: dbates, ian, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 16662    
Attachments:
Description Flags
Patch
none
Patch none

Description Mike Lawther 2012-01-08 21:13:39 PST
background position parsing test for CSS3 calc
Comment 1 Mike Lawther 2012-01-08 21:15:08 PST
Created attachment 121618 [details]
Patch
Comment 2 Daniel Bates 2012-01-09 16:31:56 PST
Comment on attachment 121618 [details]
Patch

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

> LayoutTests/css3/calc/background-position-parsing-expected-mismatch.html:1
> +<!-- Note: This test is borrowed from ian@hixie.ch's "CSS background position: parsing" test -->

How can you borrow a test? I take it that you mean that this test is a deriviative of one of Ian's tests. Which "CSS background position: parsing" test? Briefly using google I found the following tests: <http://hixie.ch/tests/adhoc/css/background/position>. Also, is there are version/date information for the original test? When was the original test accessed? I suggest using a more formal citation as a way to document when this derivative was created and what version of the original test was it based on.

On another note, Ian's tests appear to be bound by the license <http://hixie.ch/tests/LICENSE>. This license states, among other conditions, that "you may use [the tests] as you see fit, including making changes. You may not, however, redistribute them or any derivative works in any form." Is the WebKit.org repository exempt from the redistribution clause?
Comment 3 Daniel Bates 2012-01-09 16:48:57 PST
Comment on attachment 121618 [details]
Patch

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

>> LayoutTests/css3/calc/background-position-parsing-expected-mismatch.html:1
>> +<!-- Note: This test is borrowed from ian@hixie.ch's "CSS background position: parsing" test -->
> 
> How can you borrow a test? I take it that you mean that this test is a deriviative of one of Ian's tests. Which "CSS background position: parsing" test? Briefly using google I found the following tests: <http://hixie.ch/tests/adhoc/css/background/position>. Also, is there are version/date information for the original test? When was the original test accessed? I suggest using a more formal citation as a way to document when this derivative was created and what version of the original test was it based on.
> 
> On another note, Ian's tests appear to be bound by the license <http://hixie.ch/tests/LICENSE>. This license states, among other conditions, that "you may use [the tests] as you see fit, including making changes. You may not, however, redistribute them or any derivative works in any form." Is the WebKit.org repository exempt from the redistribution clause?

Also, what is the DOCTYPE for this test?
Comment 4 Mike Lawther 2012-01-09 17:01:36 PST
Comment on attachment 121618 [details]
Patch

Yes - it is a derivative (s/borrowed/derived/ in the comment). The test I derived from is in WebKit at LayoutTests/fast/backgrounds/background-position-parsing.html.  I did not realise it was bound by a licence that affected derived works or distribution - I did not see a licence clause in the test checked into WebKit.

I can certainly restore the expected file to be identical to LayoutTests/fast/backgrounds/background-position-parsing.html, but then I guess I'm stymied by the non-distribution of derived works (which the test file with -webkit-calc would be).

As for DOCTYPE, I had previously been told not that DOCTYPE was unnecessary in a WebKit layout test, so I didn't include it.
Comment 5 Ian 'Hixie' Hickson 2012-01-09 17:12:30 PST
Feel free to use that test under the BSD license.
Comment 6 Daniel Bates 2012-01-09 17:18:56 PST
(In reply to comment #4)
> (From update of attachment 121618 [details])
> [...]
> As for DOCTYPE, I had previously been told not that DOCTYPE was unnecessary in a WebKit layout test, so I didn't include it.

It's not necessary but it's preferred to include a DOCTYPE, especially for valid HTML5 documents.
Comment 7 Mike Lawther 2012-01-09 17:28:26 PST
Created attachment 121768 [details]
Patch
Comment 8 Mike Lawther 2012-01-09 17:30:40 PST
Hixie - thanks for that!

I've reverted the expected file to be identical to LayoutTests/fast/backgrounds/background-position-parsing.html, and the calc version is the same, except has -webkit-calc() sprinkled through it.
Comment 9 Daniel Bates 2012-01-09 17:38:06 PST
Comment on attachment 121768 [details]
Patch

Looks good to me.
Comment 10 WebKit Review Bot 2012-01-09 17:54:23 PST
Comment on attachment 121768 [details]
Patch

Clearing flags on attachment: 121768

Committed r104525: <http://trac.webkit.org/changeset/104525>
Comment 11 WebKit Review Bot 2012-01-09 17:54:28 PST
All reviewed patches have been landed.  Closing bug.