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