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
= InspectorTest
.firstMatchedStyleSection();
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 InspectorTest
.domModel
.undo();
32 InspectorTest
.selectNodeAndWaitForStyles("inspected", step3
);
37 InspectorTest
.addResult("=== After undo ===");
38 InspectorTest
.dumpSelectedElementStyles(true);
40 InspectorTest
.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>