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