Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / id-or-class-before-stylesheet.html
blob9b59bcf9c2cc1736ed98742de2032960f060f2c2
1 <html lang=en>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <style>
5 #testid { background-color: red; }
6 #testID2 { background-color: red; }
7 .testclass { background-color: red; }
8 .testClass2 { background-color: red; }
9 </style>
10 </head>
11 <body>
12 <div id=testid>id test</div>
13 <style>
14 #testid { background-color: green }
15 </style>
16 <div class=testclass>class test</div>
17 <style>
18 .testclass { background-color: green; }
19 </style>
20 <div id=testID2>case insensitive id test</div>
21 <style>
22 #TESTid2 { background-color: green }
23 </style>
24 <div class=testClass2>case insensitive class test</div>
25 <style>
26 .TESTclass2 { background-color: green; }
27 </style>
28 <script>
29 description("Test that elements before inline stylesheets get their style updated properly");
30 shouldBe('window.getComputedStyle(document.getElementById("testid")).backgroundColor','"rgb(0, 128, 0)"');
31 shouldBe('window.getComputedStyle(document.getElementsByClassName("testclass")[0]).backgroundColor','"rgb(0, 128, 0)"');
32 shouldBe('window.getComputedStyle(document.getElementById("testID2")).backgroundColor','"rgb(0, 128, 0)"');
33 shouldBe('window.getComputedStyle(document.getElementsByClassName("testClass2")[0]).backgroundColor','"rgb(0, 128, 0)"');
34 </script>
35 </body>