tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / css / css3-nth-space.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 <style>
6 div.class { background-color: red; }
7 div.class:nth-of-type(3n
8  +   1) {background-color: green;}
9 </style>
10
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.');
20
21
22
23 el = document.getElementById("first");
24 shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color')", "'rgb(0, 128, 0)'");
25
26 el = document.getElementById("second");
27 shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color')", "'rgb(255, 0, 0)'");
28
29 el = document.getElementById("third");
30 shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color')", "'rgb(255, 0, 0)'");
31
32 el = document.getElementById("fourth");
33 shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color')", "'rgb(0, 128, 0)'");
34 </script>
35 <script src="../js/resources/js-test-post.js"></script>
36 </body>
37 </html>