Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / counters / invalidate-cached-counter-node.html
blob77ee63e53d0584bf43a2d95035db22c0e4fab44a
1 <head>
2 <style>
3 div.test { counter-increment: test-number; }
4 div.test:before { content: counter(test-number) ". "; }
5 </style>
6 </head>
7 <body>
8 <p>
9 Test for <i><a href="rdar://problem/6131096">rdar://problem/6131096</a>
10 Reproducible crash in CounterNode::isReset under guard malloc</i>.
11 </p>
12 <div id="view">
13 <div id="destroy-me" class="test">This should not be visible</div>
14 <div id="keep-me" class="test">This sentence should be numbered 1.</div>
15 </div>
16 <script>
17 document.body.offsetTop;
18 document.getElementById("destroy-me").style.display = "none";
19 document.body.offsetTop;
20 document.getElementById("keep-me").style.fontSize = "20px";
22 if (window.testRunner) {
23 testRunner.dumpAsText();
24 var testResult;
25 var counterValue = window.internals.counterValue(document.getElementById("keep-me"));
26 if (counterValue == "1")
27 testResult = "PASS";
28 else
29 testResult = 'FAIL: the counter value should have been "1", but was "' + counterValue + '".';
30 var viewElement = document.getElementById("view");
31 viewElement.parentNode.removeChild(viewElement);
32 document.body.appendChild(document.createTextNode(testResult));
34 </script>
35 </body>