Title: [166727] trunk/LayoutTests
Revision
166727
Author
zol...@webkit.org
Date
2014-04-03 09:49:28 -0700 (Thu, 03 Apr 2014)

Log Message

[WebInspector] inspector/dom/highlight-shape-outside-margin.html is failing
https://bugs.webkit.org/show_bug.cgi?id=131126

Reviewed by Timothy Hatcher.

I updated the test, so it works with the new testing framework. I included the shape path results in the test,
so we won't run into rounding problems, and we don't have that big test set, which would require an expected
result generation. We can add it later, if we extend the test set. The logic is similar to the non margin test case.

* TestExpectations:
* inspector/dom/highlight-shape-outside-margin-expected.txt:
* inspector/dom/highlight-shape-outside-margin.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (166726 => 166727)


--- trunk/LayoutTests/ChangeLog	2014-04-03 16:48:23 UTC (rev 166726)
+++ trunk/LayoutTests/ChangeLog	2014-04-03 16:49:28 UTC (rev 166727)
@@ -1,3 +1,18 @@
+2014-04-03  Zoltan Horvath  <zol...@webkit.org>
+
+        [WebInspector] inspector/dom/highlight-shape-outside-margin.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=131126
+
+        Reviewed by Timothy Hatcher.
+
+        I updated the test, so it works with the new testing framework. I included the shape path results in the test,
+        so we won't run into rounding problems, and we don't have that big test set, which would require an expected
+        result generation. We can add it later, if we extend the test set. The logic is similar to the non margin test case.
+
+        * TestExpectations:
+        * inspector/dom/highlight-shape-outside-margin-expected.txt:
+        * inspector/dom/highlight-shape-outside-margin.html:
+
 2014-04-03  Bem Jones-Bey  <bjone...@adobe.com>
 
         [CSS Shapes] CRASH with calc() value args in inset round

Modified: trunk/LayoutTests/TestExpectations (166726 => 166727)


--- trunk/LayoutTests/TestExpectations	2014-04-03 16:48:23 UTC (rev 166726)
+++ trunk/LayoutTests/TestExpectations	2014-04-03 16:49:28 UTC (rev 166727)
@@ -49,8 +49,6 @@
 fast/mediastream/MediaStream-construct-with-ended-tracks.html [ Skip ]
 fast/mediastream/MediaStream-clone.html [ Skip ]
 
-webkit.org/b/126519 inspector/dom/highlight-shape-outside-margin.html [ Failure ]
-
 webkit.org/b/126142 css3/calc/transitions-dependent.html [ Pass Failure ]
 
 webkit.org/b/124932 media/video-size.html [ Pass Failure ]

Modified: trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin-expected.txt (166726 => 166727)


--- trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin-expected.txt	2014-04-03 16:48:23 UTC (rev 166726)
+++ trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin-expected.txt	2014-04-03 16:49:28 UTC (rev 166727)
@@ -1,7 +1,7 @@
-PASS: Shape roughly equals [M 60 50 L 90 50 C 95.52 50 100 54.48 100 60 L 100 90 C 100 95.52 95.52 100 90 100 L 60 100 C 54.48 100 50 95.52 50 90 L 50 60 C 50 54.48 54.48 50 60 50 Z]
-PASS: Margin shape roughly equals [M 60 40 L 90 40 C 101.05 40 110 48.95 110 60 L 110 90 C 110 101.05 101.05 110 90 110 L 60 110 C 48.95 110 40 101.05 40 90 L 40 60 C 40 48.95 48.95 40 60 40 Z]
-PASS: Shape roughly equals [M 75 25 L 75 25 C 102.61 25 125 47.39 125 75 L 125 75 C 125 102.61 102.61 125 75 125 L 75 125 C 47.39 125 25 102.61 25 75 L 25 75 C 25 47.39 47.39 25 75 25 Z]
-PASS: Margin shape roughly equals [M 75 15 L 75 15 C 108.14 15 135 41.86 135 75 L 135 75 C 135 108.14 108.14 135 75 135 L 75 135 C 41.86 135 15 108.14 15 75 L 15 75 C 15 41.86 41.86 15 75 15 Z]
-PASS: Shape roughly equals [M 50 50 L 100 50 L 100 100 L 50 100 L 50 50 Z]
-PASS: Margin shape roughly equals [M 50 49 L 100 49 L 100 50 L 50 50 L 50 49 Z M 49 50 L 101 50 L 101 100 L 49 100 L 49 50 Z M 50 100 L 100 100 L 100 101 L 50 101 L 50 100 Z]
+PASS: .inset
+PASS: .inset with shape-margin
+PASS: .circle
+PASS: .circle with shape-margin
+PASS: .svg
+PASS: .svg with shape-margin
 

Modified: trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin.html (166726 => 166727)


--- trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin.html	2014-04-03 16:48:23 UTC (rev 166726)
+++ trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin.html	2014-04-03 16:49:28 UTC (rev 166727)
@@ -14,10 +14,10 @@
     -webkit-shape-margin: 10px;
 }
 .inset {
-    -webkit-shape-outside: inset(25px 25px 25px 25px round 10px 10px) content-box;
+    -webkit-shape-outside: inset(25px round 10px) content-box;
 }
 .circle {
-    -webkit-shape-outside: circle(50px) content-box;
+    -webkit-shape-outside: circle(25% at center) content-box;
 }
 .svg {
     -webkit-shape-outside: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none' width='100px' height='100px'><rect x='25' y='25' width='50' height='50' fill='blue' /></svg>");
@@ -31,56 +31,35 @@
     var testcases = [
     {
         'selector' : '.inset',
-        'shape' : roundedRectCommands(50, 50, 50, 50, 10),
-        'marginShape' : roundedRectCommands(40, 40, 70, 70, 20)
+        'path' : ['M', 60, 50, 'L', 90, 50, 'C', 96, 50, 100, 54, 100, 60, 'L', 100, 90, 'C', 100, 96, 96, 100, 90, 100,
+            'L', 60, 100, 'C', 54, 100, 50, 96, 50, 90, 'L', 50, 60, 'C', 50, 54, 54, 50, 60, 50, 'Z'],
+        'marginPath' : ['M', 60, 40, 'L', 90, 40, 'C', 101, 40, 110, 49, 110, 60, 'L', 110, 90, 'C', 110, 101, 101, 110, 90, 110,
+            'L', 60, 110, 'C', 49, 110, 40, 101, 40, 90, 'L', 40, 60, 'C', 40, 49, 49, 40, 60, 40, 'Z']
     },
     {
         'selector' : '.circle',
-        'shape' : roundedRectCommands(25, 25, 100, 100, 50),
-        'marginShape' : roundedRectCommands(15, 15, 120, 120, 60)
+        'path' : ['M', 75, 63, 'L', 75, 63, 'C', 89, 63, 100, 74, 100, 88, 'L', 100, 88, 'C', 100, 102, 89, 113, 75, 113, 'L', 75, 113,
+            'C', 61, 113, 50, 102, 50, 88, 'L', 50, 88, 'C', 50, 74, 61, 63, 75, 63, 'Z'],
+        'marginPath' : ['M', 75, 53, 'L', 75, 53, 'C', 94, 53, 110, 69, 110, 88, 'L', 110, 88, 'C', 110, 107, 94, 123, 75, 123, 'L', 75, 123,
+            'C', 56, 123, 40, 107, 40, 88, 'L', 40, 88, 'C', 40, 69, 56, 53, 75, 53, 'Z']
     },
     {
         'selector' : '.svg',
-        'shape' : roundedRectCommands(50, 50, 50, 50, 0),
-        'marginShape' : [].concat(roundedRectCommands(50, 49, 50, 1, 0),
-            roundedRectCommands(49, 50, 52, 50, 0),
-            roundedRectCommands(50, 100, 50, 1, 0))
-    }
-    ];
+        'path' : ['M', 50, 63, 'L', 100, 63, 'L', 100, 113, 'L', 50, 113, 'Z'],
+        'marginPath' : ['M', 50, 62, 'L', 100, 62, 'L', 100, 63, 'L', 50, 63, 'Z',
+            'M', 49, 63, 'L', 101, 63, 'L', 101, 113, 'L', 49, 113, 'Z',
+            'M', 50, 113, 'L', 100, 113, 'L', 100, 114, 'L', 50, 114, 'Z']
+    }];
 
-    function roundedRectCommands(x, y, w, h, r) {
-        if (!r)
-            return ['M', x, y, 'L', x + w, y, 'L', x + w, y + h, 'L', x, y + h, 'L', x, y, 'Z'];
-
-        // Approximate 1 - kappa, see Path.cpp
-        var control = .447715;
-
-        var commands = [];
-
-        commands.push('M', x + r, y);
-        commands.push('L', x + w - r, y);
-        commands.push('C', x + w - control * r, y, x + w, y + control * r, x + w, y + r);
-
-        commands.push('L', x + w, y + h - r);
-        commands.push('C', x + w, y + h - control * r, x + w - control * r, y + h, x + w - r, y + h);
-
-        commands.push('L', x + r, y + h);
-        commands.push('C', x + control * r, y + h, x, y + h - control * r, x, y + h - r);
-
-        commands.push('L', x, y + r);
-        commands.push('C', x, y + control * r, x + control * r, y, x + r, y);
-        commands.push('Z');
-
-        return commands;
-    }
-
     function runNextTest(tests) {
         var testcase = tests[0];
+        var selectorInformation = "Selector: \'" + testcase.selector + "\'";
 
         InspectorTest.Shapes.getShapeOutsideInfoForSelector(testcase.selector, function(payload) {
-            InspectorTest.log("Comparing shape information for selector: " + testcase.selector);
-            InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.shape, testcase.shape, "Shape information was not roughly equal.");
-            InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.marginShape, testcase.marginShape, "Margin shape information was not roughly equal.");
+            if (!InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.shape, testcase.path, selectorInformation + " Shape information was not roughly equal."))
+                InspectorTest.log("PASS: " + testcase.selector);
+            if (!InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.marginShape, testcase.marginPath, selectorInformation + " Margin shape information was not roughly equal."))
+                InspectorTest.log("PASS: " + testcase.selector + " with shape-margin");
 
             if (tests.length > 1)
                 runNextTest(tests.splice(1));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to