| <!DOCTYPE html> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| <style> |
| #calc { |
| background-position: calc(10px + 20%) calc(30px + 40%); |
| vertical-align: calc(50px + 60%); |
| flex-basis: calc(70px + 80%); |
| } |
| </style> |
| <div id="calc"></div> |
| <script> |
| test(function() { |
| assert_equals(getComputedStyle(calc).backgroundPositionX, "calc(10px + 20%)", "background-position-x"); |
| assert_equals(getComputedStyle(calc).backgroundPositionY, "calc(30px + 40%)", "background-position-y"); |
| assert_equals(getComputedStyle(calc).verticalAlign, "calc(50px + 60%)", "vertical-align"); |
| assert_equals(getComputedStyle(calc).flexBasis, "calc(70px + 80%)", "flex-basis"); |
| }, "Tests getComputedStyle works with calc for various properties"); |
| </script> |