8 <script src="../../http/tests/inspector/inspector-test.js"></script>
9 <script src="../../http/tests/inspector/elements-test.js"></script>
14 WebInspector.showPanel("elements");
15 InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
19 InspectorTest.addResult("=== Before selector modification ===");
20 InspectorTest.dumpSelectedElementStyles(true);
21 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2];
22 section.startEditingSelector();
23 section._selectorElement.textContent = "hr, #inspected ";
24 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
25 InspectorTest.runAfterPendingDispatches(step2);
30 InspectorTest.addResult("=== After non-affecting selector modification ===");
31 InspectorTest.dumpSelectedElementStyles(true);
32 var section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][2];
33 section.startEditingSelector();
34 section._selectorElement.textContent = "#inspectedChanged";
35 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
36 InspectorTest.runAfterPendingDispatches(step3);
41 InspectorTest.addResult("=== After affecting selector modification ===");
42 InspectorTest.dumpSelectedElementStyles(true);
43 InspectorTest.completeTest();
50 <body onload="runTest()">
52 Tests that renaming a selector updates element styles. <a href="https://bugs.webkit.org/show_bug.cgi?id=70018">Bug 70018</a>.
55 <div id="inspected" style="color: red">Text</div>
56 <div id="other"></div>