Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / counter-reset-with-none.html
blobfed6da50524494d2ae052b37fe7e2cf6359c0604
1 <!DOCTYPE html>
2 <style>
3 #counterReset {
4 counter-reset: c 10;
7 #counterIncrement {
8 counter-increment: c 2;
11 #counterResetAndIncrementSameCounter {
12 counter-reset: c 10;
13 counter-increment: c 2;
16 #counterResetAndIncrementDifferentCounter {
17 counter-reset: a 5;
18 counter-increment: c 2;
20 </style>
21 <div id="counterReset"></div>
22 <div id="counterIncrement"></div>
23 <div id="counterResetAndIncrementSameCounter"></div>
24 <div id="counterResetAndIncrementDifferentCounter"></div>
25 <script src="../../../resources/js-test.js"></script>
26 <script>
27 description("Test that resetting 'counter-reset' and 'counter-increment' with 'none' works as expected.");
29 debug("Testing resetting 'counter-reset' alone");
30 shouldBeEqualToString('window.getComputedStyle(counterReset, null).getPropertyValue("counter-reset")', 'c 10');
31 shouldBeEqualToString('window.getComputedStyle(counterReset, null).getPropertyValue("counter-increment")', 'none');
32 counterReset.style.counterReset = "none";
33 shouldBeEqualToString('window.getComputedStyle(counterReset, null).getPropertyValue("counter-reset")', 'none');
34 shouldBeEqualToString('window.getComputedStyle(counterReset, null).getPropertyValue("counter-increment")', 'none');
36 debug("Testing resetting 'counter-increment' alone");
37 shouldBeEqualToString('window.getComputedStyle(counterIncrement, null).getPropertyValue("counter-reset")', 'none');
38 shouldBeEqualToString('window.getComputedStyle(counterIncrement, null).getPropertyValue("counter-increment")', 'c 2');
39 counterIncrement.style.counterIncrement = "none";
40 shouldBeEqualToString('window.getComputedStyle(counterIncrement, null).getPropertyValue("counter-reset")', 'none');
41 shouldBeEqualToString('window.getComputedStyle(counterIncrement, null).getPropertyValue("counter-increment")', 'none');
43 debug("Testing resetting 'counter-reset' with 'counter-increment'");
44 shouldBeEqualToString('window.getComputedStyle(counterResetAndIncrementSameCounter, null).getPropertyValue("counter-reset")', 'c 10');
45 shouldBeEqualToString('window.getComputedStyle(counterResetAndIncrementSameCounter, null).getPropertyValue("counter-increment")', 'c 2');
46 counterResetAndIncrementSameCounter.style.counterReset = "none";
47 shouldBeEqualToString('window.getComputedStyle(counterResetAndIncrementSameCounter, null).getPropertyValue("counter-reset")', 'none');
48 shouldBeEqualToString('window.getComputedStyle(counterResetAndIncrementSameCounter, null).getPropertyValue("counter-increment")', 'c 2');
50 debug("Testing resetting 'counter-increment' with 'counter-reset'");
51 shouldBeEqualToString('window.getComputedStyle(counterResetAndIncrementDifferentCounter, null).getPropertyValue("counter-reset")', 'a 5');
52 shouldBeEqualToString('window.getComputedStyle(counterResetAndIncrementDifferentCounter, null).getPropertyValue("counter-increment")', 'c 2');
53 counterResetAndIncrementDifferentCounter.style.counterIncrement = "none";
54 shouldBeEqualToString('window.getComputedStyle(counterResetAndIncrementDifferentCounter, null).getPropertyValue("counter-reset")', 'a 5');
55 shouldBeEqualToString('window.getComputedStyle(counterResetAndIncrementDifferentCounter, null).getPropertyValue("counter-increment")', 'none');
56 </script>