| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>CSS Snap Size: parsing snap-height</title> | 2 <title>CSS Snap Size: parsing snap-height</title> |
| 3 <link rel="author" title="Koji Ishii" href="kojiishi@gmail.com"> | 3 <link rel="author" title="Koji Ishii" href="kojiishi@gmail.com"> |
| 4 <link rel="help" href="https://drafts.csswg.org/css-snap-size/#snap-height"> | 4 <link rel="help" href="https://drafts.csswg.org/css-snap-size/#snap-height"> |
| 5 <meta name="assert" content="This test asserts the parsing and getComputedStyle
works correctly for the snap-height property."> | 5 <meta name="assert" content="This test asserts the parsing and getComputedStyle
works correctly for the snap-height property."> |
| 6 <meta name="flags" content="dom"> | 6 <meta name="flags" content="dom"> |
| 7 <script src="../../../resources/testharness.js"></script> | 7 <script src="/resources/testharness.js"></script> |
| 8 <script src="../../../resources/testharnessreport.js"></script> | 8 <script src="/resources/testharnessreport.js"></script> |
| 9 | 9 |
| 10 <div data-expected="0px" title="initial value"></div> | 10 <div data-expected="0px" title="initial value"></div> |
| 11 | 11 |
| 12 <div style="snap-height: 20px 60" data-expected="20px 60"> | 12 <div style="snap-height: 20px 60" data-expected="20px 60"> |
| 13 <div data-expected="20px 60" title="snap-height should inherit"></div> | 13 <div data-expected="20px 60" title="snap-height should inherit"></div> |
| 14 <div style="snap-height: initial" data-expected="0px"></div> | 14 <div style="snap-height: initial" data-expected="0px"></div> |
| 15 <div style="snap-height: initial; snap-height: inherit" data-expected="20px 60
"></div> | 15 <div style="snap-height: initial; snap-height: inherit" data-expected="20px 60
"></div> |
| 16 | 16 |
| 17 <div style="snap-height: 40px" data-expected="40px"></div> | 17 <div style="snap-height: 40px" data-expected="40px"></div> |
| 18 | 18 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 33 test(function () { | 33 test(function () { |
| 34 var actual = getComputedStyle(element).snapHeight; | 34 var actual = getComputedStyle(element).snapHeight; |
| 35 assert_equals(actual, element.dataset.expected); | 35 assert_equals(actual, element.dataset.expected); |
| 36 }, element.title || element.getAttribute("style")); | 36 }, element.title || element.getAttribute("style")); |
| 37 }); | 37 }); |
| 38 | 38 |
| 39 test(function () { | 39 test(function () { |
| 40 assert_equals(getComputedStyle(document.getElementById("pt")).snapHeight.slice
(-2), "px"); | 40 assert_equals(getComputedStyle(document.getElementById("pt")).snapHeight.slice
(-2), "px"); |
| 41 }, "Computed value must be the absolute length"); | 41 }, "Computed value must be the absolute length"); |
| 42 </script> | 42 </script> |
| OLD | NEW |