| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <head> | |
| 3 <script src="../resources/testharness.js"></script> | |
| 4 <script src="../resources/testharnessreport.js"></script> | |
| 5 <script src="../resources/run-after-layout-and-paint.js"></script> | |
| 6 <script src="resources/test-runner-invalidation-logging.js"></script> | |
| 7 <style> | |
| 8 div { | |
| 9 width: 100px; | |
| 10 height: 100px; | |
| 11 background-color: red; | |
| 12 | |
| 13 flex-basis: 200px; | |
| 14 --str:foo; | |
| 15 --fiftypx: 50px; | |
| 16 } | |
| 17 </style> | |
| 18 </head> | |
| 19 <p>This tests the invalidation behaviour of the paint callback.</p> | |
| 20 <p>See the devtools console for additional test output.</p> | |
| 21 <script> | |
| 22 CSS.registerProperty({name: '--length-inherited', syntax: '<length>', inherits:
true, initialValue: '0px'}); | |
| 23 CSS.registerProperty({name: '--length-non-inherited', syntax: '<length>', inheri
ts: false, initialValue: '0px'}); | |
| 24 | |
| 25 // TODO(ikilpatrick): Should test shorthands. | |
| 26 testRunnerInvalidationLogging('background-image', [ | |
| 27 { property: 'max-height', value: '160px' }, | |
| 28 { property: 'max-height', prevValue: '100px', value: '160px' }, | |
| 29 { property: 'max-height', prevValue: '100px', value: 'calc(50px + 50px)', no
Invalidation: true }, | |
| 30 { property: 'max-height', prevValue: '100px', value: 'calc(50px + var(--fift
ypx))', noInvalidation: true }, | |
| 31 { property: 'flex-basis', value: '100px' }, | |
| 32 { property: 'flex-basis', prevValue: '100px' }, | |
| 33 { property: 'flex-basis', value: '200px', noInvalidation: true }, | |
| 34 { property: 'flex-basis', prevValue: '200px', noInvalidation: true }, | |
| 35 { property: 'color', value: 'red' }, | |
| 36 { property: 'color', prevValue: '#F00', value: 'red', noInvalidation: true }
, | |
| 37 { property: 'border-top-color', value: 'blue' }, | |
| 38 { property: 'border-top-color', prevValue: 'rgb(0,0,255)', value: 'blue', no
Invalidation: true }, | |
| 39 { property: '--foo', value: 'foo' }, | |
| 40 { property: '--foo', prevValue: 'foo', value: 'var(--str)', noInvalidation:
true}, | |
| 41 { property: '--str', value: 'bar'}, | |
| 42 { property: '--str', value: 'foo', noInvalidation: true }, | |
| 43 { property: '--length-inherited', value: '10px'}, | |
| 44 { property: '--length-non-inherited', value: '20px'}, | |
| 45 { property: '-webkit-border-radius', value: '25px'}, | |
| 46 { property: '-webkit-border-radius', invalidationProperty: 'border-radius',
value: '25px'}, | |
| 47 { property: 'border-radius', invalidationProperty: '-webkit-border-radius',
prevValue: '25px'}, | |
| 48 { property: '-webkit-border-radius', prevValue: '100px', value: 'calc(50px +
50px)', noInvalidation: true }, | |
| 49 { property: '-webkit-margin-start', invalidationProperty: 'margin-left', pre
vValue: 'calc(50px + 50px)', value: '100px', noInvalidation: true }, | |
| 50 ]); | |
| 51 </script> | |
| OLD | NEW |