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> |