3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script>
9 WebInspector.showPanel("elements");
13 InspectorTest.runTestSuite([
14 function setUp(next) {
15 InspectorTest.selectNodeAndWaitForStyles("inspected", next);
18 function addRule(next)
20 InspectorTest.nodeWithId("inspected", nodeCallback);
22 function nodeCallback(node)
25 stylesPane = WebInspector.panels.elements.sidebarPanes.styles;
26 stylesPane.addBlankSection();
27 var section = stylesPane.sections[0][2];
28 section.startEditingSelector();
29 section._selectorElement.textContent = "foo, #inspected, .bar, #inspected";
30 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
31 InspectorTest.runAfterPendingDispatches(callback);
36 InspectorTest.dumpSelectedElementStyles(true, false, false, true);
41 function changeSelector(next)
43 var section = stylesPane.sections[0][2];
44 section.startEditingSelector();
45 var selectorElement = section._selectorElement;
46 selectorElement.textContent = "#inspected, a, hr";
47 selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
48 InspectorTest.runAfterPendingDispatches(callback);
52 InspectorTest.dumpSelectedElementStyles(true, false, false, true);
62 <body onload="runTest()">
64 Tests that matching selectors are marked properly after new rule creation and selector change.
67 <div id="inspected"></div>