| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/elements-test.js"></script> | 4 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 5 <script src="styles-test.js"></script> | 5 <script src="styles-test.js"></script> |
| 6 <link rel="stylesheet" href="resources/different-rule-types.css"> | 6 <link rel="stylesheet" href="resources/different-rule-types.css"> |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 function test() | 9 function test() |
| 10 { | 10 { |
| 11 InspectorTest.selectNodeAndWaitForStyles("inspect", fetchStyleSheet); | 11 InspectorTest.selectNodeAndWaitForStyles("inspect", fetchStyleSheet); |
| 12 | 12 |
| 13 function fetchStyleSheet() | 13 function fetchStyleSheet() |
| 14 { | 14 { |
| 15 var styleSheets = WebInspector.cssModel.allStyleSheets(); | 15 var styleSheets = InspectorTest.cssModel.allStyleSheets(); |
| 16 for (var i = 0; i < styleSheets.length; ++i) { | 16 for (var i = 0; i < styleSheets.length; ++i) { |
| 17 var styleSheetHeader = styleSheets[i]; | 17 var styleSheetHeader = styleSheets[i]; |
| 18 if (styleSheetHeader.sourceURL.indexOf("different-rule-types.css") =
== -1) | 18 if (styleSheetHeader.sourceURL.indexOf("different-rule-types.css") =
== -1) |
| 19 continue; | 19 continue; |
| 20 InspectorTest.addNewRuleInStyleSheet(styleSheetHeader, "#other, div"
, onRuleAdded); | 20 InspectorTest.addNewRuleInStyleSheet(styleSheetHeader, "#other, div"
, onRuleAdded); |
| 21 return; | 21 return; |
| 22 } | 22 } |
| 23 } | 23 } |
| 24 | 24 |
| 25 function onRuleAdded() | 25 function onRuleAdded() |
| (...skipping 15 matching lines...) Expand all Loading... |
| 41 <p> | 41 <p> |
| 42 Tests that adding new rule in the stylesheet end works as expected. | 42 Tests that adding new rule in the stylesheet end works as expected. |
| 43 </p> | 43 </p> |
| 44 | 44 |
| 45 <div class="inspected">Styled element</div> | 45 <div class="inspected">Styled element</div> |
| 46 <div id="inspect"></div> | 46 <div id="inspect"></div> |
| 47 <div id="other"></div> | 47 <div id="other"></div> |
| 48 | 48 |
| 49 </body> | 49 </body> |
| 50 </html> | 50 </html> |
| OLD | NEW |