3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/elements-test.js"></script>
5 <script src=
"../styles/styles-test.js"></script>
6 <link rel=
"stylesheet" href=
"../styles/resources/different-rule-types.css">
11 InspectorTest
.selectNodeAndWaitForStyles("inspect", fetchStyleSheet
);
13 function fetchStyleSheet()
15 var styleSheets
= InspectorTest
.cssModel
.allStyleSheets();
16 for (var i
= 0; i
< styleSheets
.length
; ++i
) {
17 var styleSheetHeader
= styleSheets
[i
];
18 if (styleSheetHeader
.sourceURL
.indexOf("different-rule-types.css") === -1)
20 InspectorTest
.addNewRuleInStyleSheet(styleSheetHeader
, "#other, div", onRuleAdded
);
25 function onRuleAdded()
27 InspectorTest
.selectNodeAndWaitForStyles("other", onNodeSelected
);
30 function onNodeSelected()
32 InspectorTest
.dumpSelectedElementStyles(true, false, true);
33 InspectorTest
.completeTest();
40 <body onload=
"runTest()">
42 Tests that adding new rule in the stylesheet end works as expected.
45 <div class=
"inspected">Styled element
</div>
46 <div id=
"inspect"></div>
47 <div id=
"other"></div>