1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <script src="../js/resources/js-test-pre.js"></script>
6 div.class { background-color: red; }
7 div.class:nth-of-type(3n
8 + 1) {background-color: green;}
13 <div tabindex=1" id="first" class="class"></div>
14 <div tabindex=2" id="second" class="class"></div>
15 <div tabindex=3" id="third" class="class"></div>
16 <div tabindex=4" id="fourth" class="class"></div>
17 <div id="console"></div>
19 description('This test passes if the nth-of-type(3n + 1) is parsed correctly, regardless of the whitespaces.');
23 el = document.getElementById("first");
24 shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color')", "'rgb(0, 128, 0)'");
26 el = document.getElementById("second");
27 shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color')", "'rgb(255, 0, 0)'");
29 el = document.getElementById("third");
30 shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color')", "'rgb(255, 0, 0)'");
32 el = document.getElementById("fourth");
33 shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color')", "'rgb(0, 128, 0)'");
35 <script src="../js/resources/js-test-post.js"></script>