Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../resources/testharness.js"></script> | |
| 3 <script src="../resources/testharnessreport.js"></script> | |
| 4 <style> | |
| 5 #target { | |
| 6 transition: 1s; | |
| 7 border-style: solid; | |
| 8 outline-style: solid; | |
| 9 column-rule-style: solid; | |
| 10 } | |
| 11 </style> | |
| 12 <div id="target"></div> | |
| 13 <script> | |
| 14 var lengthProperties = [ | |
| 15 'baselineShift', | |
| 16 'borderBottomWidth', | |
| 17 'borderLeftWidth', | |
| 18 'borderRightWidth', | |
| 19 'borderTopWidth', | |
| 20 'bottom', | |
| 21 'cx', | |
| 22 'cy', | |
| 23 'flexBasis', | |
| 24 'height', | |
| 25 'left', | |
| 26 'letterSpacing', | |
| 27 'marginBottom', | |
| 28 'marginLeft', | |
| 29 'marginRight', | |
| 30 'marginTop', | |
| 31 'maxHeight', | |
| 32 'maxWidth', | |
| 33 'minHeight', | |
| 34 'minWidth', | |
| 35 'offsetDistance', | |
| 36 'outlineOffset', | |
| 37 'outlineWidth', | |
| 38 'paddingBottom', | |
| 39 'paddingLeft', | |
| 40 'paddingRight', | |
| 41 'paddingTop', | |
| 42 'perspective', | |
| 43 'r', | |
| 44 'right', | |
| 45 'rx', | |
| 46 'ry', | |
| 47 'shapeMargin', | |
| 48 'strokeDashoffset', | |
| 49 'strokeWidth', | |
| 50 'top', | |
| 51 'verticalAlign', | |
| 52 'webkitBorderHorizontalSpacing', | |
| 53 'webkitBorderVerticalSpacing', | |
| 54 'columnGap', | |
| 55 'columnRuleWidth', | |
| 56 'columnWidth', | |
| 57 'webkitPerspectiveOriginX', | |
| 58 'webkitPerspectiveOriginY', | |
| 59 'webkitTransformOriginX', | |
| 60 'webkitTransformOriginY', | |
| 61 'webkitTransformOriginZ', | |
| 62 'width', | |
| 63 'wordSpacing', | |
| 64 'x', | |
| 65 'y', | |
| 66 'lineHeight', | |
| 67 ]; | |
| 68 var expected = {}; | |
| 69 | |
| 70 // The test setup is wrapped in a test() call to make sure we fail if an error i s thrown. | |
|
suzyh_UTC10 (ex-contributor)
2016/12/14 05:53:30
It's just occurred to me that we need to be sure t
alancutter (OOO until 2018)
2016/12/14 05:59:28
That's exactly what I should be using, thanks!
| |
| 71 test(() => { | |
| 72 for (var property of lengthProperties) { | |
| 73 target.style[property] = '10px'; | |
| 74 expected[property] = getComputedStyle(target)[property]; | |
| 75 } | |
| 76 internals.setZoomFactor(2); | |
| 77 }, 'Test setup'); | |
| 78 | |
| 79 for (var property of lengthProperties) { | |
| 80 test(() => { | |
| 81 assert_equals(getComputedStyle(target)[property], expected[property]); | |
| 82 }, 'Computed value of transitionable ' + property + ' should not change when z oom changes'); | |
| 83 } | |
| 84 </script> | |
| OLD | NEW |