Changeset 175755 in webkit


Ignore:
Timestamp:
Nov 7, 2014 12:02:58 PM (9 years ago)
Author:
Bem Jones-Bey
Message:

[CSS Shapes] the sandbag JS utility code isn't producing the correct expected result in the shape-image gradient tests
https://bugs.webkit.org/show_bug.cgi?id=135923

Reviewed by Dirk Schulze.

Import tests from upstream. They have been modified so that they use
testharness to validate success or failure instead of being reftests,
allowing for fuzziness in matching to get around small variances
between implementations.

  • TestExpectations:
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001-expected.html: Removed.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001-expected.txt: Added.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html:
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002-expected.html: Removed.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002-expected.txt: Added.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002.html:
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003-expected.html: Removed.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003-expected.txt: Added.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003.html:
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004-expected.html: Removed.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004-expected.txt: Added.
  • css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004.html:
  • css3/shapes/shape-outside/shape-image/gradients/w3c-import.log:
  • css3/shapes/shape-outside/supported-shapes/support/test-utils.js:

(verifyTextPoints):

Location:
trunk/LayoutTests
Files:
4 added
4 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r175744 r175755  
     12014-11-07  Bem Jones-Bey  <bjonesbe@adobe.com>
     2
     3        [CSS Shapes] the sandbag JS utility code isn't producing the correct expected result in the shape-image gradient tests
     4        https://bugs.webkit.org/show_bug.cgi?id=135923
     5
     6        Reviewed by Dirk Schulze.
     7
     8        Import tests from upstream. They have been modified so that they use
     9        testharness to validate success or failure instead of being reftests,
     10        allowing for fuzziness in matching to get around small variances
     11        between implementations.
     12
     13        * TestExpectations:
     14        * css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001-expected.html: Removed.
     15        * css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001-expected.txt: Added.
     16        * css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html:
     17        * css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002-expected.html: Removed.
     18        * css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002-expected.txt: Added.
     19        * css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002.html:
     20        * css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003-expected.html: Removed.
     21        * css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003-expected.txt: Added.
     22        * css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003.html:
     23        * css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004-expected.html: Removed.
     24        * css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004-expected.txt: Added.
     25        * css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004.html:
     26        * css3/shapes/shape-outside/shape-image/gradients/w3c-import.log:
     27        * css3/shapes/shape-outside/supported-shapes/support/test-utils.js:
     28        (verifyTextPoints):
     29
    1302014-11-07  Mark Lam  <mark.lam@apple.com>
    231
  • trunk/LayoutTests/TestExpectations

    r175740 r175755  
    132132
    133133# Various failures from the W3C CSS Shapes test suite import
    134 
    135 webkit.org/b/135923 css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html [ ImageOnlyFailure ]
    136 webkit.org/b/135923 css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002.html [ ImageOnlyFailure ]
    137 webkit.org/b/135923 css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003.html [ ImageOnlyFailure ]
    138 webkit.org/b/135923 css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004.html [ ImageOnlyFailure ]
    139134
    140135webkit.org/b/137788 css3/shapes/shape-outside/shape-image/shape-image-010.html [ ImageOnlyFailure ]
  • trunk/LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html

    r172733 r175755  
    4949        x<br/>
    5050    </div>
     51    <div id="log"></div>
     52    <script src="../../../../../resources/testharness.js"></script>
     53    <script src="../../../../../resources/testharnessreport.js"></script>
    5154    <script src="../../supported-shapes/support/rounded-rectangle.js"></script>
    5255    <script src="../../supported-shapes/support/subpixel-utils.js"></script>
  • trunk/LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002.html

    r172733 r175755  
    77    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"/>
    88    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-margin-property"/>
    9     <link rel="match" href="reference/shape-outside-radial-gradient-001-ref.html"/>
    109    <meta name="flags" content="ahem dom"/>
    1110    <meta name="assert" content="This test verifies that shape-outside respects a
     
    5251        x<br/>
    5352    </div>
     53    <div id="log"></div>
     54    <script src="../../../../../resources/testharness.js"></script>
     55    <script src="../../../../../resources/testharnessreport.js"></script>
    5456    <script src="../../supported-shapes/support/rounded-rectangle.js"></script>
    5557    <script src="../../supported-shapes/support/subpixel-utils.js"></script>
     
    6163                containerHeight: 200,
    6264                lineHeight: 10
    63         }, 10);
     65        }, 10, 1);
    6466     </script>
    6567</body>
  • trunk/LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003.html

    r172733 r175755  
    88    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-margin-property"/>
    99    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-image-threshold-property"/>
    10     <link rel="match" href="reference/shape-outside-radial-gradient-001-ref.html"/>
    1110    <meta name="flags" content="ahem dom"/>
    1211    <meta name="assert" content="This test verifies that shape-outside respects a
     
    5453        x<br/>
    5554    </div>
     55    <div id="log"></div>
     56    <script src="../../../../../resources/testharness.js"></script>
     57    <script src="../../../../../resources/testharnessreport.js"></script>
    5658    <script src="../../supported-shapes/support/rounded-rectangle.js"></script>
    5759    <script src="../../supported-shapes/support/subpixel-utils.js"></script>
  • trunk/LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004.html

    r172733 r175755  
    77    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"/>
    88    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-image-threshold-property"/>
    9     <link rel="match" href="reference/shape-outside-radial-gradient-001-ref.html"/>
    109    <meta name="flags" content="ahem dom"/>
    1110    <meta name="assert" content="This test verifies that shape-outside respects a
     
    5352        x<br/>
    5453    </div>
     54    <div id="log"></div>
     55    <script src="../../../../../resources/testharness.js"></script>
     56    <script src="../../../../../resources/testharnessreport.js"></script>
    5557    <script src="../../supported-shapes/support/rounded-rectangle.js"></script>
    5658    <script src="../../supported-shapes/support/subpixel-utils.js"></script>
  • trunk/LayoutTests/css3/shapes/shape-outside/shape-image/gradients/w3c-import.log

    r175255 r175755  
    1111
    1212------------------------------------------------------------------------
    13 Last Import: 2014-10-27 11:23
     13Last Import: 2014-11-07 10:20
    1414------------------------------------------------------------------------
    1515Properties requiring vendor prefixes:
     
    2121------------------------------------------------------------------------
    2222List of files:
    23 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-001-expected.html
    24 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-001.html
    25 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-002-expected.html
    26 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-002.html
    27 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-003-expected.html
    28 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-003.html
    29 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-004-expected.html
    30 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-004.html
    31 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001-expected.html
    32 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html
    33 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002-expected.html
    34 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002.html
    35 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003-expected.html
    36 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003.html
    37 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004-expected.html
    38 /LayoutTests/css3/shapes/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004.html
     23/LayoutTests/w3c/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-001-expected.html
     24/LayoutTests/w3c/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-001.html
     25/LayoutTests/w3c/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-002-expected.html
     26/LayoutTests/w3c/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-002.html
     27/LayoutTests/w3c/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-003-expected.html
     28/LayoutTests/w3c/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-003.html
     29/LayoutTests/w3c/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-004-expected.html
     30/LayoutTests/w3c/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-linear-gradient-004.html
     31/LayoutTests/w3c/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html
     32/LayoutTests/w3c/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-radial-gradient-002.html
     33/LayoutTests/w3c/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-radial-gradient-003.html
     34/LayoutTests/w3c/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-radial-gradient-004.html
  • trunk/LayoutTests/css3/shapes/shape-outside/supported-shapes/support/test-utils.js

    r172733 r175755  
    11function verifyTextPoints(shape, numLines, tolerance, side) {
     2    var failed = false;
    23    if (tolerance === undefined)
    34        tolerance = 0.5;
     
    1516       if (side === "right")
    1617            actual = shape.containerWidth - (actual + line.getBoundingClientRect().width);
    17        
     18
    1819        if( Math.abs( (actual - expected[i])) > tolerance ){
    1920            line.style.setProperty('color', 'red');
    2021            console.log('diff: ' + Math.abs(actual - expected[i]));
     22            failed = true;
    2123        }
    2224    }
     25    if (window.done) {
     26        assert_false(failed, "Lines positioned properly around the shape.");
     27        done();
     28    }
    2329}
Note: See TracChangeset for help on using the changeset viewer.