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

Unified Diff: LayoutTests/fast/css/counters/counter-increment-not-reflected-on-stylechange.html

Issue 1185573004: CSS Counters not properly updated on style changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updating as per review comments Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/css/counters/counter-increment-not-reflected-on-stylechange-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/counters/counter-increment-not-reflected-on-stylechange.html
diff --git a/LayoutTests/fast/css/counters/counter-increment-not-reflected-on-stylechange.html b/LayoutTests/fast/css/counters/counter-increment-not-reflected-on-stylechange.html
new file mode 100644
index 0000000000000000000000000000000000000000..365857b451d78cf99f687505a15144f51562d2cd
--- /dev/null
+++ b/LayoutTests/fast/css/counters/counter-increment-not-reflected-on-stylechange.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+ #outer
+ {
+ counter-reset: c;
+ }
+
+ #outer > div:before
+ {
+ content: counter(c);
+ }
+
+ .active > div:before {
+ counter-increment: c;
+ }
+
+ .inactive > div:before {
+ counter-increment: none;
+ }
+</style>
+
+<div id="outer">
+ <div id="inner1"></div>
+ <div id="inner2"></div>
+</div>
+
+<script>
+ var outerDiv = document.getElementById("outer");
+ outerDiv.className = "inactive";
+ outerDiv.offsetTop;
+ outerDiv.className = "active";
+
+ shouldBeEqualToString("window.internals.counterValue(document.getElementById('inner1'))", "1");
+ shouldBeEqualToString("window.internals.counterValue(document.getElementById('inner2'))", "2");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/counters/counter-increment-not-reflected-on-stylechange-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698