OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <style> |
| 4 .root1, .root2 { max-height: 200px } |
| 5 .root3 { max-height: 100px } |
| 6 #root span { max-height: inherit } |
| 7 </style> |
| 8 <div id="root" class="root1"> |
| 9 <span></span> |
| 10 </div> |
| 11 <script> |
| 12 description("Explicit inheritance of non-inherited property. Test that the expli
citInherit flag in ComputedStyle is maintained correctly."); |
| 13 |
| 14 root.offsetTop; // force recalc |
| 15 root.className = "root2"; |
| 16 |
| 17 // No inheritance neede but explicitlInheritance needs to be set. |
| 18 if (window.internals) |
| 19 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); |
| 20 |
| 21 root.offsetTop; // force recalc |
| 22 root.className = "root3"; |
| 23 |
| 24 if (window.internals) |
| 25 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); |
| 26 |
| 27 shouldBeEqualToString("getComputedStyle(root.querySelector('span')).maxHeight",
"100px"); |
| 28 </script> |
OLD | NEW |