Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / css3 / calc / getComputedStyle-calc-assert.html
blobb59f5109d922e1814d34031d78069a7b0531921f
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <style>
5 #calc {
6 background-position: calc(10px + 20%) calc(30px + 40%);
7 vertical-align: calc(50px + 60%);
8 flex-basis: calc(70px + 80%);
10 </style>
11 <div id="calc"></div>
12 <script>
13 test(function() {
14 assert_equals(getComputedStyle(calc).backgroundPositionX, "calc(10px + 20%)", "background-position-x");
15 assert_equals(getComputedStyle(calc).backgroundPositionY, "calc(30px + 40%)", "background-position-y");
16 assert_equals(getComputedStyle(calc).verticalAlign, "calc(50px + 60%)", "vertical-align");
17 assert_equals(getComputedStyle(calc).flexBasis, "calc(70px + 80%)", "flex-basis");
18 }, "Tests getComputedStyle works with calc for various properties");
19 </script>