1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <title>CSS Test: Counter-increment tests
</title>
5 <link rel=
"author" title=
"Microsoft" href=
"http://www.microsoft.com/">
6 <link rel=
"help" href=
"http://www.w3.org/TR/CSS21/generate.html#counters">
7 <script src=
"../../../resources/js-test.js"></script>
9 if (window
.testRunner
) {
10 testRunner
.dumpAsText();
11 testRunner
.waitUntilDone();
15 /* These are text versions of the counter-increment-* tests in the CSS 2.1 test suite.
16 So 'test3' here is equivalent to counter-increment-003.htm, and so on.
17 WebKit dumpAsText versions of counter-increment-001 and 002 already exist in fast/css/counters */
18 shouldBe("window.internals.counterValue(document.getElementById('test3'))", "'-2147483648'");
19 shouldBe("window.internals.counterValue(document.getElementById('test4'))", "'-2147483647'");
20 shouldBe("window.internals.counterValue(document.getElementById('test5'))", "'0'");
21 shouldBe("window.internals.counterValue(document.getElementById('test6'))", "'0'");
22 shouldBe("window.internals.counterValue(document.getElementById('test7'))", "'0'");
23 shouldBe("window.internals.counterValue(document.getElementById('test8'))", "'10'");
24 shouldBe("window.internals.counterValue(document.getElementById('test9'))", "'10'");
25 shouldBe("window.internals.counterValue(document.getElementById('test10'))", "'2147483646'");
26 shouldBe("window.internals.counterValue(document.getElementById('test11'))", "'2147483647'");
27 shouldBe("window.internals.counterValue(document.getElementById('test12'))", "'2147483647'");
28 shouldBe("window.internals.counterValue(document.getElementById('test13'))", "'2147483647'");
29 shouldBe("window.internals.counterValue(document.getElementById('test14'))", "'2'");
30 shouldBe("window.internals.counterValue(document.getElementById('test15'))", "'-2147483648'");
31 shouldBe("window.internals.counterValue(document.getElementById('test16'))", "'-2147483648'");
32 shouldBe("window.internals.counterValue(document.getElementById('test17'))", "'-2147483648'");
33 shouldBe("window.internals.counterValue(document.getElementById('test18'))", "'0'");
34 shouldBe("window.internals.counterValue(document.getElementById('test19'))", "'0'");
35 shouldBe("window.internals.counterValue(document.getElementById('test20'))", "'0'");
36 shouldBe("window.internals.counterValue(document.getElementById('test21'))", "'20'");
37 shouldBe("window.internals.counterValue(document.getElementById('test22'))", "'20'");
38 shouldBe("window.internals.counterValue(document.getElementById('test23'))", "'2147483647'");
39 shouldBe("window.internals.counterValue(document.getElementById('test24'))", "'2147483647'");
40 shouldBe("window.internals.counterValue(document.getElementById('test25'))", "'2147483647'");
41 shouldBe("window.internals.counterValue(document.getElementById('test26'))", "'2147483647'");
42 shouldBe("window.internals.counterValue(document.getElementById('test27'))", "'3'");
43 shouldBe("window.internals.counterValue(document.getElementById('test28'))", "'-2147483648'");
44 shouldBe("window.internals.counterValue(document.getElementById('test29'))", "'-2147483648'");
45 shouldBe("window.internals.counterValue(document.getElementById('test30'))", "'-2147483648'");
46 shouldBe("window.internals.counterValue(document.getElementById('test31'))", "'0'");
47 shouldBe("window.internals.counterValue(document.getElementById('test32'))", "'0'");
48 shouldBe("window.internals.counterValue(document.getElementById('test33'))", "'0'");
49 shouldBe("window.internals.counterValue(document.getElementById('test34'))", "'30'");
50 shouldBe("window.internals.counterValue(document.getElementById('test35'))", "'30'");
51 shouldBe("window.internals.counterValue(document.getElementById('test36'))", "'2147483647'");
52 shouldBe("window.internals.counterValue(document.getElementById('test37'))", "'2147483647'");
53 shouldBe("window.internals.counterValue(document.getElementById('test38'))", "'2147483647'");
54 shouldBe("window.internals.counterValue(document.getElementById('test39'))", "'2147483647'");
55 shouldBe("window.internals.counterValue(document.getElementById('test40'))", "'32'");
56 shouldBe("window.internals.counterValue(document.getElementById('test41'))", "'-2147483648'");
57 shouldBe("window.internals.counterValue(document.getElementById('test42'))", "'-2147483648'");
58 shouldBe("window.internals.counterValue(document.getElementById('test43'))", "'-2147483648'");
59 shouldBe("window.internals.counterValue(document.getElementById('test44'))", "'0'");
60 shouldBe("window.internals.counterValue(document.getElementById('test45'))", "'0'");
61 shouldBe("window.internals.counterValue(document.getElementById('test46'))", "'0'");
62 shouldBe("window.internals.counterValue(document.getElementById('test47'))", "'320'");
63 shouldBe("window.internals.counterValue(document.getElementById('test48'))", "'320'");
64 shouldBe("window.internals.counterValue(document.getElementById('test49'))", "'2147483647'");
65 shouldBe("window.internals.counterValue(document.getElementById('test50'))", "'2147483647'");
66 shouldBe("window.internals.counterValue(document.getElementById('test51'))", "'2147483647'");
67 shouldBe("window.internals.counterValue(document.getElementById('test52'))", "'2147483647'");
68 shouldBe("window.internals.counterValue(document.getElementById('test53'))", "'5'");
69 shouldBe("window.internals.counterValue(document.getElementById('none53'))", "'5'");
70 shouldBe("window.internals.counterValue(document.getElementById('test53a'))", "'10'");
71 shouldBe("window.internals.counterValue(document.getElementById('wrapper54'))", "'5'");
72 shouldBe("window.internals.counterValue(document.getElementById('test54'))", "'10'");
73 shouldBe("window.internals.counterValue(document.getElementById('test55'))", "'1'");
74 shouldBe("window.internals.counterValue(document.getElementById('test56'))", "'-2147483648'");
75 if (window
.testRunner
)
76 testRunner
.notifyDone();
79 <style type=
"text/css">
82 counter-increment: ident3
-2147483648;
86 content: counter
(ident3
);
90 counter-increment: ident4
-2147483647;
94 content: counter
(ident4
);
98 counter-increment: ident5
-0;
102 content: counter
(ident5
);
106 counter-increment: ident6
0;
110 content: counter
(ident6
);
114 counter-increment: ident7
+0;
118 content: counter
(ident7
);
122 counter-increment: ident8
10;
126 content: counter
(ident8
);
130 counter-increment: ident9
+10;
134 content: counter
(ident9
);
138 counter-increment: ident10
2147483646;
142 content: counter
(ident10
);
146 counter-increment: ident11
2147483647;
150 content: counter
(ident11
);
154 counter-increment: ident12
+2147483647;
158 content: counter
(ident12
);
162 counter-increment: ident13
2147483648;
166 content: counter
(ident13
);
170 counter-increment: ident14 ident14
;
174 content: counter
(ident14
);
179 counter-increment: ident15
-2147483649 ident15
-2147483649;
183 content: counter
(ident15
);
187 counter-increment: ident16
-2147483648 ident16
-2147483648;
191 content: counter
(ident16
);
195 counter-increment: ident17
-2147483647 ident17
-2147483647;
199 content: counter
(ident17
);
203 counter-increment: ident18
-0 ident18
-0;
207 content: counter
(ident18
);
211 counter-increment: ident19
0 ident19
0;
215 content: counter
(ident19
);
219 counter-increment: ident20
+0 ident20
+0;
223 content: counter
(ident20
);
228 counter-increment: ident21
10 ident21
10;
232 content: counter
(ident21
);
236 counter-increment: ident22
+10 ident22
+10;
240 content: counter
(ident22
);
244 counter-increment: ident23
2147483646 ident23
2147483646;
248 content: counter
(ident23
);
252 counter-increment: ident24
2147483647 ident24
2147483647;
256 content: counter
(ident24
);
260 counter-increment: ident25
+2147483647 ident25
+2147483647;
264 content: counter
(ident25
);
268 counter-increment: ident26
2147483648 ident26
2147483648;
272 content: counter
(ident26
);
276 counter-increment: ident27 ident27 ident27
;
280 content: counter
(ident27
);
284 counter-increment: ident28
-2147483649 ident28
-2147483649 ident28
-2147483649;
288 content: counter
(ident28
);
292 counter-increment: ident29
-2147483648 ident29
-2147483648 ident29
-2147483648;
296 content: counter
(ident29
);
300 counter-increment: ident30
-2147483647 ident30
-2147483647 ident30
-2147483647;
304 content: counter
(ident30
);
308 counter-increment: ident31
-0 ident31
-0 ident31
-0;
312 content: counter
(ident31
);
316 counter-increment: ident32
0 ident32
0 ident32
0;
320 content: counter
(ident32
);
324 counter-increment: ident33
+0 ident33
+0 ident33
+0;
328 content: counter
(ident33
);
332 counter-increment: ident34
10 ident34
10 ident34
10;
336 content: counter
(ident34
);
340 counter-increment: ident35
+10 ident35
+10 ident35
+10;
344 content: counter
(ident35
);
348 counter-increment: ident36
2147483646 ident36
2147483646 ident36
2147483646;
352 content: counter
(ident36
);
356 counter-increment: ident37
2147483647 ident37
2147483647 ident37
2147483647;
360 content: counter
(ident37
);
364 counter-increment: ident38
+2147483647 ident38
+2147483647 ident38
+2147483647;
368 content: counter
(ident38
);
372 counter-increment: ident39
2147483648 ident39
2147483648 ident39
2147483648;
376 content: counter
(ident39
);
380 counter-increment: ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40 ident40
;
384 content: counter
(ident40
);
388 counter-increment: ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649 ident41
-2147483649;
392 content: counter
(ident41
);
396 counter-increment: ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648 ident42
-2147483648;
400 content: counter
(ident42
);
404 counter-increment: ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647 ident43
-2147483647;
408 content: counter
(ident43
);
412 counter-increment: ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0 ident44
-0;
416 content: counter
(ident44
);
420 counter-increment: ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0 ident45
0;
424 content: counter
(ident45
);
428 counter-increment: ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0 ident46
+0;
432 content: counter
(ident46
);
436 counter-increment: ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10 ident47
10;
440 content: counter
(ident47
);
444 counter-increment: ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10 ident48
+10;
448 content: counter
(ident48
);
452 counter-increment: ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646 ident49
2147483646;
456 content: counter
(ident49
);
460 counter-increment: ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647 ident50
2147483647;
464 content: counter
(ident50
);
468 counter-increment: ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647 ident51
+2147483647;
472 content: counter
(ident51
);
476 counter-increment: ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648 ident52
2147483648;
480 content: counter
(ident52
);
484 counter-increment: ident53
5;
488 counter-increment: ident53
5;
492 counter-increment: none
;
496 content: counter
(ident53
);
500 content: counter
(ident53
);
504 content: counter
(ident53
);
507 #wrapper54 /*test 54*/
509 counter-increment: ident54
5;
513 counter-increment: inherit
;
517 content: counter
(ident54
);
521 content: counter
(ident54
);
526 counter-increment: ident55
;
530 content: counter
(ident55
);
534 counter-increment: ident56
-2147483649;
538 content: counter
(ident56
);
543 <body onload=
"setTimeout('run()', 0);">
544 <div id=
"test3"></div>
545 <div id=
"test4"></div>
546 <div id=
"test5"></div>
547 <div id=
"test6"></div>
548 <div id=
"test7"></div>
549 <div id=
"test8"></div>
550 <div id=
"test9"></div>
551 <div id=
"test10"></div>
552 <div id=
"test11"></div>
553 <div id=
"test12"></div>
554 <div id=
"test13"></div>
555 <div id=
"test14"></div>
556 <div id=
"test15"></div>
557 <div id=
"test16"></div>
558 <div id=
"test17"></div>
559 <div id=
"test18"></div>
560 <div id=
"test19"></div>
561 <div id=
"test20"></div>
562 <div id=
"test21"></div>
563 <div id=
"test22"></div>
564 <div id=
"test23"></div>
565 <div id=
"test24"></div>
566 <div id=
"test25"></div>
567 <div id=
"test26"></div>
568 <div id=
"test27"></div>
569 <div id=
"test28"></div>
570 <div id=
"test29"></div>
571 <div id=
"test30"></div>
572 <div id=
"test31"></div>
573 <div id=
"test32"></div>
574 <div id=
"test33"></div>
575 <div id=
"test34"></div>
576 <div id=
"test35"></div>
577 <div id=
"test36"></div>
578 <div id=
"test37"></div>
579 <div id=
"test38"></div>
580 <div id=
"test39"></div>
581 <div id=
"test40"></div>
582 <div id=
"test41"></div>
583 <div id=
"test42"></div>
584 <div id=
"test43"></div>
585 <div id=
"test44"></div>
586 <div id=
"test45"></div>
587 <div id=
"test46"></div>
588 <div id=
"test47"></div>
589 <div id=
"test48"></div>
590 <div id=
"test49"></div>
591 <div id=
"test50"></div>
592 <div id=
"test51"></div>
593 <div id=
"test52"></div>
594 <div id=
"test53"></div>
595 <div id=
"none53"></div>
596 <div id=
"test53a"></div>
598 <div id=
"test54"></div>
600 <div id=
"test55"></div>
601 <div id=
"test56"></div>