Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / css3-nth-space.html
bloba916e8bc2cdd8d308e50450e995cf7e416d12392
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <style>
6 div.class { background-color: red; }
7 div.class:nth-of-type(3n
8 + 1) {background-color: green;}
9 </style>
11 </head>
12 <body>
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>
18 <script>
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)'");
34 </script>
35 </body>
36 </html>