3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script>
9 WebInspector.showPanel("elements");
10 InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
17 InspectorTest.dumpSelectedElementStyles(true);
18 treeElement = InspectorTest.getElementStylePropertyTreeItem("color");
20 treeElement.startEditing();
21 treeElement.nameElement.textContent = "color";
22 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
24 // Update incrementally, do not commit.
25 treeElement.valueElement.textContent = "green";
26 treeElement.kickFreeFlowStyleEditForTest();
29 treeElement.valueElement.firstChild.select();
30 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("U+001B")); // Escape
31 InspectorTest.runAfterPendingDispatches(step2);
36 InspectorTest.selectNodeWithId("other");
37 InspectorTest.runAfterPendingDispatches(step3);
42 InspectorTest.selectNodeAndWaitForStyles("inspected", step4);
47 InspectorTest.addResult("After append:");
48 InspectorTest.dumpSelectedElementStyles(true);
49 InspectorTest.completeTest();
56 <body onload="runTest()">
58 Tests that editing is canceled properly after incremental editing.
61 <div id="inspected" style="color: red">Text</div>
62 <div id="other"></div>