Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/toggle-style-inside-shadow-root.html

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698