Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Window / getMatchedCSSRules-with-pseudo-elements.html
blobf65ca3d6c098e16a76e34283cd192a67a310e7db
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <style type="text/css" media="screen">
6 #div1 {
7 border: 2px;
9 #div1:after {
10 border: 1px;
12 </style>
13 <script src="../../../resources/js-test.js"></script>
14 </head>
15 <body>
16 <div id="div1"></div>
17 <script>
18 description("Test for getMatchedCSSRules for Pseudo Elements");
19 var element = document.getElementById('div1');
20 var pseudoRules = window.getMatchedCSSRules(element, "after");
21 var selectorText = "#div1::after";
23 shouldBe('pseudoRules[0].selectorText', 'selectorText');
24 shouldBeTrue('pseudoRules[0].style.cssText.indexOf("1px") != -1');
26 successfullyParsed = true;
27 </script>
28 </body>
29 </html>