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 = "#inspected, #other";
23 section._selectorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
24 InspectorTest.selectNodeAndWaitForStyles("other", step2);
29 InspectorTest.addResult("=== After selector modification ===");
30 InspectorTest.dumpSelectedElementStyles(true);
31 WebInspector.domModel.undo();
32 InspectorTest.selectNodeAndWaitForStyles("inspected", step3);
37 InspectorTest.addResult("=== After undo ===");
38 InspectorTest.dumpSelectedElementStyles(true);
40 WebInspector.domModel.redo();
41 InspectorTest.selectNodeAndWaitForStyles("other", step4);
46 InspectorTest.addResult("=== After redo ===");
47 InspectorTest.dumpSelectedElementStyles(true);
48 InspectorTest.completeTest();
55 <body onload="runTest()">
57 Tests that setting selector text can be undone.
60 <div id="inspected"></div>
61 <div id="other"></div>