| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script src="script-tests/css-mediarule-parentRule.js"></script> | 7 <script> |
| 8 description( |
| 9 'This tests that calling parentRule on the child rule of MediaRule is equal to t
hat MediaRule.' |
| 10 ); |
| 11 |
| 12 if (window.testRunner) |
| 13 testRunner.dumpAsText(); |
| 14 |
| 15 var head = document.getElementsByTagName('head')[0]; |
| 16 head.innerHTML = "<style>@media all { a { border-color: red; } }</style>"; |
| 17 |
| 18 var styleSheetList = document.styleSheets; |
| 19 var styleSheet = styleSheetList[0]; |
| 20 var mediaRule = styleSheet.cssRules[0]; |
| 21 var childRule = mediaRule.cssRules[0]; |
| 22 |
| 23 shouldBe("childRule.parentRule", "mediaRule") |
| 24 </script> |
| 8 </body> | 25 </body> |
| 9 </html> | 26 </html> |
| OLD | NEW |