Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / pseudo-target-indirect-sibling-001.html
blob7ea14a59a7c9ec88ce30e3557e4c66347172b6f8
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script>
6 if (window.testRunner)
7 testRunner.waitUntilDone();
9 window.jsTestIsAsync = true;
11 </script>
13 <style>
14 div.class { background-color: red; }
15 :hover {background-color:blue; }
16 :target~#fourth { background-color: green; }
17 </style>
19 </head>
20 <body onhashchange="hashchange();">
21 <p id="description"></p>
22 <div tabindex=1" id="first" class="class"></div>
23 <div tabindex=2" id="second" class="class"></div>
24 <div tabindex=3" id="third" class="class"></div>
25 <div tabindex=4" id="fourth" class="class"></div>
26 <div id="console"></div>
27 <script>
28 description('This test passes if it finds an element whose id is "fourth" and has a sibling that comes before it and whose id matches the fragment of the url of this test.');
31 if (window.location.hash.indexOf("second") == -1)
32 window.location.hash = "#second";
34 function hashchange() {
35 el = document.getElementById("first");
36 shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color')", "'rgb(255, 0, 0)'");
38 el = document.getElementById("second");
39 shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color')", "'rgb(255, 0, 0)'");
41 el = document.getElementById("third");
42 shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color')", "'rgb(255, 0, 0)'");
44 el = document.getElementById("fourth");
45 shouldBe("document.defaultView.getComputedStyle(el, null).getPropertyValue('background-color')", "'rgb(0, 128, 0)'");
46 finishJSTest();
48 </script>
49 </body>
50 </html>