Changeset 166673 in webkit


Ignore:
Timestamp:
Apr 2, 2014 4:06:36 PM (10 years ago)
Author:
zoltan@webkit.org
Message:

[WebInspector] inspector-protocol/model/highlight-shape-outside.html is failing
https://bugs.webkit.org/show_bug.cgi?id=124660

Reviewed by Timothy Hatcher.

I updated the tests syntax to CR, CSS Shapes specification. It's also needed to be updated
to the latest WebInspector testing methods. I added some addidional test cases for the highlighting,
and also fixed some expected test case in the script, and updated the expected file.

  • TestExpectations:
  • inspector/dom/highlight-shape-outside-expected.txt:
  • inspector/dom/highlight-shape-outside.html:
  • inspector/dom/shapes-test.js:

(InspectorTestProxy.registerInitializer.):

Location:
trunk/LayoutTests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r166671 r166673  
     12014-04-02  Zoltan Horvath  <zoltan@webkit.org>
     2
     3        [WebInspector] inspector-protocol/model/highlight-shape-outside.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=124660
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        I updated the tests syntax to CR, CSS Shapes specification. It's also needed to be updated
     9        to the latest WebInspector testing methods. I added some addidional test cases for the highlighting,
     10        and also fixed some expected test case in the script, and updated the expected file.
     11
     12        * TestExpectations:
     13        * inspector/dom/highlight-shape-outside-expected.txt:
     14        * inspector/dom/highlight-shape-outside.html:
     15        * inspector/dom/shapes-test.js:
     16        (InspectorTestProxy.registerInitializer.):
     17
    1182014-04-02  Chris Fleizach  <cfleizach@apple.com>
    219
  • trunk/LayoutTests/TestExpectations

    r166353 r166673  
    5050fast/mediastream/MediaStream-clone.html [ Skip ]
    5151
    52 webkit.org/b/124660 inspector/dom/highlight-shape-outside.html [ Failure ]
    5352webkit.org/b/126519 inspector/dom/highlight-shape-outside-margin.html [ Failure ]
    5453
  • trunk/LayoutTests/inspector/dom/highlight-shape-outside-expected.txt

    r165501 r166673  
    1 PASS: Actual [M 50 50 L 150 50 L 150 100 L 50 100 L 50 50 Z] Expected [M 50 50 L 150 50 L 150 100 L 50 100 L 50 50 Z]
    2 PASS: Actual [M 50 50 L 100 50 L 100 100 L 50 100 Z] Expected [M 50 50 L 100 50 L 100 100 L 50 100 Z]
    3 PASS: Actual [M 75 75 L 175 75 L 175 125 L 75 125 L 75 75 Z] Expected [M 75 75 L 175 75 L 175 125 L 75 125 L 75 75 Z]
    4 PASS: Actual [M 50 50 L 150 50 L 150 100 L 50 100 L 50 50 Z] Expected [M 50 50 L 150 50 L 150 100 L 50 100 L 50 50 Z]
    5 PASS: Actual [M 50 50 L 50 100 L 150 100 L 150 50 L 50 50 Z] Expected [M 50 50 L 50 100 L 150 100 L 150 50 L 50 50 Z]
    6 PASS: Actual [M 150 50 L 150 100 L 50 100 L 50 50 L 150 50 Z] Expected [M 150 50 L 150 100 L 50 100 L 50 50 L 150 50 Z]
    7 PASS: Actual [M 175 75 L 175 125 L 75 125 L 75 75 L 175 75 Z] Expected [M 175 75 L 175 125 L 75 125 L 75 75 L 175 75 Z]
    8 PASS: Actual [M 150 50 L 150 100 L 50 100 L 50 50 L 150 50 Z] Expected [M 150 50 L 150 100 L 50 100 L 50 50 L 150 50 Z]
    9 PASS: Actual [M 25 25 L 125 25 L 125 125 L 25 125 L 25 25 Z] Expected [M 25 25 L 125 25 L 125 125 L 25 125 L 25 25 Z]
    10 PASS: Actual [M 50 50 L 100 50 L 100 100 L 50 100 Z] Expected [M 50 50 L 100 50 L 100 100 L 50 100 Z]
    11 PASS: Actual [M 35 35 L 115 35 L 115 65 L 35 65 Z M 35 85 L 115 85 L 115 115 L 35 115 Z] Expected [M 35 35 L 115 35 L 115 65 L 35 65 Z M 35 85 L 115 85 L 115 115 L 35 115 Z]
    12 PASS: Actual [M 50 50 L 100 50 L 100 100 L 50 100 Z] Expected [M 50 50 L 100 50 L 100 100 L 50 100 Z]
     1PASS: .inset
     2PASS: .inset.padded
     3PASS: .inset.padded.border-box
     4PASS: .polygon
     5PASS: .polygon.padded.border-box
     6PASS: .vertical-lr > .inset
     7PASS: .vertical-lr > .inset.padded
     8PASS: .vertical-lr > .inset.padded.border-box
     9PASS: .vertical-rl > .inset
     10PASS: .vertical-rl > .inset.padded
     11PASS: .vertical-rl > .inset.padded.border-box
     12PASS: .content-box.padded
     13PASS: .raster-svg.padded
     14PASS: .raster-svg-complex.padded
     15PASS: .raster-png.padded
    1316
  • trunk/LayoutTests/inspector/dom/highlight-shape-outside.html

    r165501 r166673  
    1010    height: 200px;
    1111    margin-right: -200px;
     12    box-sizing: border-box;
    1213}
    1314.padded {
    14     width: 100px;
    15     height: 100px;
    1615    padding: 25px 75px 75px 25px;
    1716}
    18 .border-box {
    19     box-sizing: border-box;
     17.vertical-lr, .vertical-rl {
     18    float: left;
    2019}
    2120.vertical-lr {
     
    2524    -webkit-writing-mode: vertical-rl;
    2625}
    27 .rectangle {
    28     -webkit-shape-outside: rectangle(50px, 50px, 100px, 50px) content-box;
     26.inset {
     27    -webkit-shape-outside: inset(50px 50px 100px 50px) content-box;
    2928}
    30 .rectangle.border-box {
    31     -webkit-shape-outside: rectangle(50px, 50px, 100px, 50px) border-box;
     29.inset.padded {
     30    -webkit-shape-outside: inset(5px 5px 10px 5px) content-box;
     31}
     32.inset.padded.border-box {
     33    -webkit-shape-outside: inset(50px 50px 100px 50px) border-box;
    3234}
    3335.polygon {
    34     -webkit-shape-outside: polygon(50px 50px, 100px 50px, 100px 100px, 50px 100px) content-box;
     36    -webkit-shape-outside: polygon(50px 50px, 150px 50px, 150px 100px, 50px 100px) content-box;
    3537}
    3638.polygon.border-box {
    37     -webkit-shape-outside: polygon(50px 50px, 100px 50px, 100px 100px, 50px 100px) border-box;
     39    -webkit-shape-outside: polygon(50px 50px, 150px 50px, 150px 100px, 50px 100px) border-box;
    3840}
    3941.content-box {
     
    5759    var testcases = [
    5860    {
    59         'selector' : '.rectangle',
     61        'selector' : '.inset',
     62        'path' : ['M', 50, 50, 'L', 150, 50, 'L', 150, 100, 'L', 50, 100, 'L', 50, 50, 'Z']
     63    },
     64    {
     65        'selector' : '.inset.padded',
     66        'path' : ['M', 30, 30, 'L', 120, 30, 'L', 120, 115, 'L', 30, 115, 'L', 30, 30, 'Z']
     67    },
     68    {
     69        'selector' : '.inset.padded.border-box',
    6070        'path' : ['M', 50, 50, 'L', 150, 50, 'L', 150, 100, 'L', 50, 100, 'L', 50, 50, 'Z']
    6171    },
    6272    {
    6373        'selector' : '.polygon',
    64         'path' : ['M', 50, 50, 'L', 100, 50, 'L', 100, 100, 'L', 50, 100, 'Z']
     74        'path' : ['M', 50, 50, 'L', 150, 50, 'L', 150, 100, 'L', 50, 100, 'Z']
    6575    },
    6676    {
    67         'selector' : '.rectangle.padded',
    68         'path' : ['M', 75, 75, 'L', 175, 75, 'L', 175, 125, 'L', 75, 125, 'L', 75, 75, 'Z']
    69     },
    70     {
    71         'selector' : '.rectangle.padded.border-box',
     77        'selector' : '.polygon.padded.border-box',
    7278        'path' : ['M', 50, 50, 'L', 150, 50, 'L', 150, 100, 'L', 50, 100, 'L', 50, 50, 'Z']
    7379    },
    7480    {
    75         'selector' : '.vertical-lr > .rectangle',
     81        'selector' : '.vertical-lr > .inset',
    7682        'path' : ['M', 50, 50, 'L', 50, 100, 'L', 150, 100, 'L', 150, 50, 'L', 50, 50, 'Z']
    7783    },
    7884    {
    79         'selector' : '.vertical-rl > .rectangle',
     85        'selector' : '.vertical-lr > .inset.padded',
     86        'path' : ['M', 30, 30, 'L', 30, 115, 'L', 120, 115, 'L', 120, 30, 'L', 30, 30, 'Z']
     87    },
     88    {
     89        'selector' : '.vertical-lr > .inset.padded.border-box',
     90        'path' : ['M', 50, 50, 'L', 50, 100, 'L', 150, 100, 'L', 150, 50, 'L', 50, 50, 'Z']
     91    },
     92    {
     93        'selector' : '.vertical-rl > .inset',
    8094        'path' : ['M', 150, 50, 'L', 150, 100, 'L', 50, 100, 'L', 50, 50, 'L', 150, 50, 'Z']
    8195    },
    8296    {
    83         'selector' : '.vertical-rl > .rectangle.padded',
    84         'path' : ['M', 175, 75, 'L', 175, 125, 'L', 75, 125, 'L', 75, 75, 'L', 175, 75, 'Z']
     97        'selector' : '.vertical-rl > .inset.padded',
     98        'path' : ['M', 120, 30, 'L', 120, 115, 'L', 30, 115, 'L', 30, 30, 'L', 120, 30, 'Z']
    8599    },
    86100    {
    87         'selector' : '.vertical-rl > .rectangle.padded.border-box',
     101        'selector' : '.vertical-rl > .inset.padded.border-box',
    88102        'path' : ['M', 150, 50, 'L', 150, 100, 'L', 50, 100, 'L', 50, 50, 'L', 150, 50, 'Z']
    89103    },
     
    109123        var testcase = tests[0];
    110124
    111         InspectorTest.Shapes.getShapeOutsideInfo(testcase.selector, function(payload) {
    112             InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.shape, testcase.shape, "Shape information was not roughly equal.");
    113             InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.marginShape, testcase.marginShape, "Margin shape information was not roughly equal.");
     125        InspectorTest.Shapes.getShapeOutsideInfoForSelector(testcase.selector, function(payload) {
     126            if (!InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.shape, testcase.path, "Selector: \'" + testcase.selector + "\' Shape information was not roughly equal."))
     127                 InspectorTest.log("PASS: " + testcase.selector);
    114128
    115129            if (tests.length > 1)
     
    125139</head>
    126140<body onload="runTest()">
    127     <div class='shape rectangle'></div>
     141    <div class='shape inset'></div>
     142    <div class='shape padded inset'></div>
     143    <div class='shape padded inset border-box'></div>
    128144    <div class='shape polygon'></div>
    129     <div class='shape padded rectangle'></div>
    130     <div class='shape padded rectangle border-box'></div>
     145    <div class='shape padded polygon border-box'></div>
    131146    <div class='vertical-lr'>
    132         <div class='shape rectangle'></div>
     147        <div class='shape inset'></div>
     148        <div class='shape padded inset'></div>
     149        <div class='shape padded inset border-box'></div>
    133150    </div>
    134151    <div class='vertical-rl'>
    135         <div class='shape rectangle'></div>
    136         <div class='shape padded rectangle'></div>
    137         <div class='shape padded rectangle border-box'></div>
     152        <div class='shape inset'></div>
     153        <div class='shape padded inset'></div>
     154        <div class='shape padded inset border-box'></div>
    138155    </div>
    139156    <div class='shape padded content-box'></div>
  • trunk/LayoutTests/inspector/dom/shapes-test.js

    r165501 r166673  
    88        function requestDocumentCallback(node) {
    99            InspectorTest.assert(node instanceof WebInspector.DOMNode, "Unexpected argument to requestDocument callback.")
    10 
    1110            DOMAgent.querySelector.invoke({nodeId: node.id, selector: selector}, querySelectorCallback);
    1211        }
     
    8584        var expectedPathString = makeStringForPath(expected);
    8685        var actualPathString = makeStringForPath(actual);
    87         var assertionMessage = message + " \nexpected: " + expectedPathString + "\n actual: " + actualPathString;
     86        var assertionMessage = message + " \nEXPECTED: " + expectedPathString + "\n  ACTUAL: " + actualPathString;
    8887        InspectorTest.assert(pathsAreRoughlyEqual(actual, expected), assertionMessage);
    8988    }
Note: See TracChangeset for help on using the changeset viewer.