3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script>
9 InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
16 InspectorTest.dumpSelectedElementStyles(true);
17 treeElement = InspectorTest.getElementStylePropertyTreeItem("color");
19 treeElement.startEditing();
20 treeElement.nameElement.textContent = "color";
21 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
23 // Update incrementally, do not commit.
24 treeElement.valueElement.textContent = "green";
25 treeElement.kickFreeFlowStyleEditForTest();
28 treeElement.valueElement.firstChild.select();
29 InspectorTest.waitForStyleApplied(onStyleApplied);
31 function onStyleApplied()
33 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("U+001B")); // Escape
34 InspectorTest.selectNodeWithId("other", step2);
40 InspectorTest.selectNodeAndWaitForStyles("inspected", step3);
45 InspectorTest.addResult("After append:");
46 InspectorTest.dumpSelectedElementStyles(true);
47 InspectorTest.completeTest();
54 <body onload="runTest()">
56 Tests that editing is canceled properly after incremental editing.
59 <div id="inspected" style="color: red">Text</div>
60 <div id="other"></div>