3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/elements-test.js"></script>
12 InspectorTest
.runTestSuite([
13 function setUp(next
) {
14 InspectorTest
.selectNodeAndWaitForStyles("inspected", next
);
17 function addRule(next
)
19 InspectorTest
.nodeWithId("inspected", nodeCallback
);
21 function nodeCallback(node
)
24 stylesPane
= WebInspector
.panels
.elements
.sidebarPanes
.styles
;
25 InspectorTest
.addNewRule("foo, #inspected, .bar, #inspected", callback
);
30 InspectorTest
.dumpSelectedElementStyles(true, false, false, true);
35 function changeSelector(next
)
37 var section
= InspectorTest
.firstMatchedStyleSection();
38 section
.startEditingSelector();
39 var selectorElement
= section
._selectorElement
;
40 selectorElement
.textContent
= "#inspected, a, hr";
41 InspectorTest
.waitForSelectorCommitted(callback
);
42 selectorElement
.dispatchEvent(InspectorTest
.createKeyEvent("Enter"));
46 InspectorTest
.dumpSelectedElementStyles(true, false, false, true);
56 <body onload=
"runTest()">
58 Tests that matching selectors are marked properly after new rule creation and selector change.
61 <div id=
"inspected"></div>