| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <div id='el'></div> | 4 <div id='el'></div> |
| 5 | 5 |
| 6 <script src="../resources/js-test.js"></script> | 6 <script src="../resources/js-test.js"></script> |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 description("Test getting and setting nonstable css properties to non-default va
lues"); | 9 description("Test getting and setting nonstable css properties to non-default va
lues"); |
| 10 | 10 |
| 11 function testStyle(property, value) { | 11 function testStyle(property, value) { |
| 12 var el = document.getElementById('el'); | 12 var el = document.getElementById('el'); |
| 13 var test = function(toEval, logResult) { | 13 var test = function(toEval, logResult) { |
| 14 var result = eval(toEval); | 14 var result = eval(toEval); |
| 15 debug(toEval + (logResult ? " is " + result : "")); | 15 debug(toEval + (logResult ? " is " + result : "")); |
| 16 } | 16 } |
| 17 test("el.style.setProperty('" + property + "', '" + value + "')", false); | 17 test("el.style.setProperty('" + property + "', '" + value + "')", false); |
| 18 test("el.style.getPropertyValue('" + property + "')", true); | 18 test("el.style.getPropertyValue('" + property + "')", true); |
| 19 test("getComputedStyle(el).getPropertyValue('" + property + "')", true); | 19 test("getComputedStyle(el).getPropertyValue('" + property + "')", true); |
| 20 debug(""); | 20 debug(""); |
| 21 } | 21 } |
| 22 | 22 |
| 23 var properties = [ | 23 var properties = [ |
| 24 ['-webkit-shape-margin', '10px'], | 24 ['shape-margin', '10px'], |
| 25 ['-webkit-shape-outside', 'circle(10px at 10px 10px)'], | 25 ['shape-outside', 'circle(10px at 10px 10px)'], |
| 26 | 26 |
| 27 ['-webkit-wrap-flow', 'both'], | 27 ['-webkit-wrap-flow', 'both'], |
| 28 ['-webkit-wrap-through', 'none'], | 28 ['-webkit-wrap-through', 'none'], |
| 29 | 29 |
| 30 ['grid-auto-columns', 'auto'], | 30 ['grid-auto-columns', 'auto'], |
| 31 ['grid-auto-rows', 'auto'], | 31 ['grid-auto-rows', 'auto'], |
| 32 ['grid-template-columns', 'min-content'], | 32 ['grid-template-columns', 'min-content'], |
| 33 ['grid-template-rows', 'max-content'], | 33 ['grid-template-rows', 'max-content'], |
| 34 ['grid-column-start', 'auto'], | 34 ['grid-column-start', 'auto'], |
| 35 ['grid-column-end', '2'], | 35 ['grid-column-end', '2'], |
| 36 ['grid-row-start', '1'], | 36 ['grid-row-start', '1'], |
| 37 ['grid-column', 'auto'], | 37 ['grid-column', 'auto'], |
| 38 ['grid-row', '1'], | 38 ['grid-row', '1'], |
| 39 ['grid-area', '2'], | 39 ['grid-area', '2'], |
| 40 ['grid-auto-flow', 'column'], | 40 ['grid-auto-flow', 'column'], |
| 41 ['grid-template-areas', '"test"'], | 41 ['grid-template-areas', '"test"'], |
| 42 | 42 |
| 43 ['text-align-last', 'start'], | 43 ['text-align-last', 'start'], |
| 44 ['text-justify', 'distribute'], | 44 ['text-justify', 'distribute'], |
| 45 ]; | 45 ]; |
| 46 | 46 |
| 47 properties.forEach(function(args) { | 47 properties.forEach(function(args) { |
| 48 testStyle(args[0], args[1]); | 48 testStyle(args[0], args[1]); |
| 49 }); | 49 }); |
| 50 | 50 |
| 51 </script> | 51 </script> |
| 52 </body> | 52 </body> |
| 53 </html> | 53 </html> |
| OLD | NEW |