Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Window / getMatchedCSSRules-nested-rules.html
blobf00891171c938a86e836d4944c05ad441401d449
1 <!DOCTYPE html>
2 <style>
3 @import url(resources/matched-rules-import-stylesheet.css);
4 @supports (display: block) {
5 @media (min-width: 1px) {
6 div {
7 color: blue;
11 </style>
12 <script src="../../../resources/js-test.js"></script>
13 <p>Test getMatchedCSSRules to output deeply nested CSSRules.</p>
14 <div>All this text should be blue.</div>
15 <span class="test-element">This span should have border.</span>
16 <script>
17 description("getMatchedCSSRules with nested CSS rules");
19 var expectedResult1 = "div { color: blue; }";
20 shouldBeEqualToString("getMatchedCSSRules(document.querySelector('div'))[0].cssText", expectedResult1);
22 var expectedResult2 = ".test-element { border: 2px solid black; }";
23 shouldBeEqualToString("getMatchedCSSRules(document.querySelector('.test-element'))[0].cssText", expectedResult2);
25 successfullyParsed = true;
26 </script>