<!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("internals.counterValue(document.getElementById('inner1'))", "1");
shouldBeEqualToString("internals.counterValue(document.getElementById('inner2'))", "2");
</script>