| OLD | NEW |
| 1 <script src="../../../resources/js-test.js"></script> | 1 <script src="../../../resources/js-test.js"></script> |
| 2 <div></div> | 2 <div></div> |
| 3 <script> | 3 <script> |
| 4 var div = document.querySelector('div'); | 4 var div = document.querySelector('div'); |
| 5 var root = div.createShadowRoot(); | 5 var root = div.createShadowRoot(); |
| 6 root.innerHTML = '<style> .red { background: red; }</style><div>tap to toggl
e red</div>'; | 6 root.innerHTML = '<style> .red { background: red; }</style><div>tap to toggl
e red</div>'; |
| 7 var rootDiv = root.querySelector('div'); | 7 var rootDiv = root.querySelector('div'); |
| 8 rootDiv.offsetHeight; | 8 rootDiv.offsetHeight; |
| 9 | 9 |
| 10 rootDiv.classList.toggle('red'); | 10 rootDiv.classList.toggle('red'); |
| 11 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '1'); | 11 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", '1
'); |
| 12 shouldBe('getComputedStyle(rootDiv).backgroundColor', '"rgb(255, 0, 0)"'); | 12 shouldBe('getComputedStyle(rootDiv).backgroundColor', '"rgb(255, 0, 0)"'); |
| 13 | 13 |
| 14 rootDiv.offsetHeight; | 14 rootDiv.offsetHeight; |
| 15 rootDiv.classList.toggle('red'); | 15 rootDiv.classList.toggle('red'); |
| 16 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", '1'); | 16 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", '1
'); |
| 17 shouldBe('getComputedStyle(rootDiv).backgroundColor', '"rgba(0, 0, 0, 0)"'); | 17 shouldBe('getComputedStyle(rootDiv).backgroundColor', '"rgba(0, 0, 0, 0)"'); |
| 18 </script> | 18 </script> |
| OLD | NEW |