Changeset 166727 in webkit
- Timestamp:
- Apr 3, 2014 9:49:28 AM (10 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r166726 r166727 1 2014-04-03 Zoltan Horvath <zoltan@webkit.org> 2 3 [WebInspector] inspector/dom/highlight-shape-outside-margin.html is failing 4 https://bugs.webkit.org/show_bug.cgi?id=131126 5 6 Reviewed by Timothy Hatcher. 7 8 I updated the test, so it works with the new testing framework. I included the shape path results in the test, 9 so we won't run into rounding problems, and we don't have that big test set, which would require an expected 10 result generation. We can add it later, if we extend the test set. The logic is similar to the non margin test case. 11 12 * TestExpectations: 13 * inspector/dom/highlight-shape-outside-margin-expected.txt: 14 * inspector/dom/highlight-shape-outside-margin.html: 15 1 16 2014-04-03 Bem Jones-Bey <bjonesbe@adobe.com> 2 17 -
trunk/LayoutTests/TestExpectations
r166673 r166727 50 50 fast/mediastream/MediaStream-clone.html [ Skip ] 51 51 52 webkit.org/b/126519 inspector/dom/highlight-shape-outside-margin.html [ Failure ]53 54 52 webkit.org/b/126142 css3/calc/transitions-dependent.html [ Pass Failure ] 55 53 -
trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin-expected.txt
r165501 r166727 1 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]2 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]3 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]4 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]5 PASS: Shape roughly equals [M 50 50 L 100 50 L 100 100 L 50 100 L 50 50 Z]6 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]1 PASS: .inset 2 PASS: .inset with shape-margin 3 PASS: .circle 4 PASS: .circle with shape-margin 5 PASS: .svg 6 PASS: .svg with shape-margin 7 7 -
trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin.html
r165501 r166727 15 15 } 16 16 .inset { 17 -webkit-shape-outside: inset(25px 25px 25px 25px round 10px10px) content-box;17 -webkit-shape-outside: inset(25px round 10px) content-box; 18 18 } 19 19 .circle { 20 -webkit-shape-outside: circle( 50px) content-box;20 -webkit-shape-outside: circle(25% at center) content-box; 21 21 } 22 22 .svg { … … 32 32 { 33 33 'selector' : '.inset', 34 'shape' : roundedRectCommands(50, 50, 50, 50, 10), 35 'marginShape' : roundedRectCommands(40, 40, 70, 70, 20) 34 'path' : ['M', 60, 50, 'L', 90, 50, 'C', 96, 50, 100, 54, 100, 60, 'L', 100, 90, 'C', 100, 96, 96, 100, 90, 100, 35 'L', 60, 100, 'C', 54, 100, 50, 96, 50, 90, 'L', 50, 60, 'C', 50, 54, 54, 50, 60, 50, 'Z'], 36 'marginPath' : ['M', 60, 40, 'L', 90, 40, 'C', 101, 40, 110, 49, 110, 60, 'L', 110, 90, 'C', 110, 101, 101, 110, 90, 110, 37 'L', 60, 110, 'C', 49, 110, 40, 101, 40, 90, 'L', 40, 60, 'C', 40, 49, 49, 40, 60, 40, 'Z'] 36 38 }, 37 39 { 38 40 'selector' : '.circle', 39 'shape' : roundedRectCommands(25, 25, 100, 100, 50), 40 'marginShape' : roundedRectCommands(15, 15, 120, 120, 60) 41 '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, 42 'C', 61, 113, 50, 102, 50, 88, 'L', 50, 88, 'C', 50, 74, 61, 63, 75, 63, 'Z'], 43 '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, 44 'C', 56, 123, 40, 107, 40, 88, 'L', 40, 88, 'C', 40, 69, 56, 53, 75, 53, 'Z'] 41 45 }, 42 46 { 43 47 'selector' : '.svg', 44 'shape' : roundedRectCommands(50, 50, 50, 50, 0), 45 'marginShape' : [].concat(roundedRectCommands(50, 49, 50, 1, 0), 46 roundedRectCommands(49, 50, 52, 50, 0), 47 roundedRectCommands(50, 100, 50, 1, 0)) 48 } 49 ]; 50 51 function roundedRectCommands(x, y, w, h, r) { 52 if (!r) 53 return ['M', x, y, 'L', x + w, y, 'L', x + w, y + h, 'L', x, y + h, 'L', x, y, 'Z']; 54 55 // Approximate 1 - kappa, see Path.cpp 56 var control = .447715; 57 58 var commands = []; 59 60 commands.push('M', x + r, y); 61 commands.push('L', x + w - r, y); 62 commands.push('C', x + w - control * r, y, x + w, y + control * r, x + w, y + r); 63 64 commands.push('L', x + w, y + h - r); 65 commands.push('C', x + w, y + h - control * r, x + w - control * r, y + h, x + w - r, y + h); 66 67 commands.push('L', x + r, y + h); 68 commands.push('C', x + control * r, y + h, x, y + h - control * r, x, y + h - r); 69 70 commands.push('L', x, y + r); 71 commands.push('C', x, y + control * r, x + control * r, y, x + r, y); 72 commands.push('Z'); 73 74 return commands; 75 } 48 'path' : ['M', 50, 63, 'L', 100, 63, 'L', 100, 113, 'L', 50, 113, 'Z'], 49 'marginPath' : ['M', 50, 62, 'L', 100, 62, 'L', 100, 63, 'L', 50, 63, 'Z', 50 'M', 49, 63, 'L', 101, 63, 'L', 101, 113, 'L', 49, 113, 'Z', 51 'M', 50, 113, 'L', 100, 113, 'L', 100, 114, 'L', 50, 114, 'Z'] 52 }]; 76 53 77 54 function runNextTest(tests) { 78 55 var testcase = tests[0]; 56 var selectorInformation = "Selector: \'" + testcase.selector + "\'"; 79 57 80 58 InspectorTest.Shapes.getShapeOutsideInfoForSelector(testcase.selector, function(payload) { 81 InspectorTest.log("Comparing shape information for selector: " + testcase.selector); 82 InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.shape, testcase.shape, "Shape information was not roughly equal."); 83 InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.marginShape, testcase.marginShape, "Margin shape information was not roughly equal."); 59 if (!InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.shape, testcase.path, selectorInformation + " Shape information was not roughly equal.")) 60 InspectorTest.log("PASS: " + testcase.selector); 61 if (!InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.marginShape, testcase.marginPath, selectorInformation + " Margin shape information was not roughly equal.")) 62 InspectorTest.log("PASS: " + testcase.selector + " with shape-margin"); 84 63 85 64 if (tests.length > 1)
Note: See TracChangeset
for help on using the changeset viewer.