Chromium Code Reviews| Index: LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html |
| diff --git a/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html b/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html |
| index b229f9faf2840bf3c33d4221c1f00614f3ff9d70..60e293328a20456324165b5e989217b8f121a7be 100644 |
| --- a/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html |
| +++ b/LayoutTests/fast/css/invalidation/targeted-class-style-invalidation.html |
| @@ -2,11 +2,14 @@ |
| <script src="../../../resources/js-test.js"></script> |
| <style> |
| - .outer .inner {} |
| + div { width: 100px } |
| + .outer .inner { width: 200px } |
| </style> |
| <div id="outer"> |
| <div id="inner" class="inner"> |
| + <div id="innerChild"> |
|
rune
2014/02/18 22:13:24
Nit: "innerChild" id unused. Would make sense to h
chrishtr
2014/02/18 22:33:16
Done.
|
| + </div> |
| </div> |
| <div id="inner2"> |
| </div> |
| @@ -23,9 +26,7 @@ function insertStyleSheet(css) |
| } |
| var outer = document.getElementById('outer'); |
| - |
| -outer.offsetTop; |
| -outer.className = 'outer'; |
| +var inner = document.getElementById('inner'); |
| // Style recalc should happen on "inner" and "outer", but not "inner2". |
| @@ -33,8 +34,21 @@ var count; |
| if (internals.runtimeFlags.targetedStyleRecalcEnabled) |
| count = 2; |
| else |
| - count = 3; |
| + count = 4; |
| + |
| +outer.offsetTop; |
| +outer.className = 'outer'; |
| +shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count); |
| +shouldBe("getComputedStyle(inner).width", '"200px"'); |
| + |
| +if (internals.runtimeFlags.targetedStyleRecalcEnabled) |
| + count = 1; |
| +else |
| + count = 2; |
| +inner.offsetTop; |
| +inner.className = ''; |
| shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '' + count); |
| +shouldBe("getComputedStyle(inner).width", '"100px"'); |
| </script> |