Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / css-mediarule-insertRule-update.html
blobe575400408f815f6447785c58b0ce8792197b91d
1 <!DOCTYPE html>
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>CSSMediaRule deleteRule test</title>
7 <style id="style1">
8 @media all {
9 p { color: red; }
11 </style>
12 <script>
13 function test() {
14 var styleSheet = document.getElementById('style1').sheet;
15 var mediaRule = styleSheet.cssRules[0];
17 mediaRule.insertRule("#test { color: green; }", mediaRule.cssRules.length);
19 </script>
20 </head>
21 <body onload="test();">
22 <p id="test">This line should be green.</p>
23 </body>
24 </html>