Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / counters / counter-reset-subtree-insert-crash.html
blob0ffbdae05ea8d65057e4c956cfaa9f1e4b66841d
1 <style>
2 #el0::after {
3 content: counter(c);
4 counter-increment: c;
7 #el1 {
8 content: counter(c);
9 counter-increment: c;
12 #el2 {
13 content: counter(c);
14 counter-increment: c;
17 #el2::after {
18 content: counter(c);
21 #el3 {
22 position: absolute;
25 #el3::before {
26 content: counter(c);
27 counter-reset: c;
30 #el3:after {
31 content: counter(c);
32 counter-reset: c;
35 #el4 {
36 counter-increment: c;
39 #el5 {
40 content: counter(c);
41 counter-increment: c;
43 </style>
44 <script>
45 if (window.testRunner)
46 testRunner.dumpAsText();
48 window.onload = function() {
49 rules = [
50 "#el2::after { counter-increment: c; } ",
51 "xyz { } "
53 stylesheet = document.styleSheets[0];
54 document.body.offsetTop;
55 stylesheet.insertRule(rules[0], stylesheet.length);
56 document.body.offsetTop;
57 stylesheet.insertRule(rules[1], stylesheet.length)
58 document.body.innerHTML = "PASS: reparenting a counter node subtree that contains resets does not cause a crash.";
60 </script>
62 <body>
63 <span id="el0">
64 <div id="el1"></div>
65 <div id="el2">
66 <div id="el3"></div>
67 <span id="el4"></span>
68 </div>
69 <div id="el5"></div>
70 </span>
71 </body>