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
.waitForStyleApplied(onStyleReverted
);
37 function onStyleReverted()
39 InspectorTest
.selectNodeWithId("other", step2
);
45 InspectorTest
.selectNodeAndWaitForStyles("inspected", step3
);
50 InspectorTest
.addResult("After append:");
51 InspectorTest
.dumpSelectedElementStyles(true);
52 InspectorTest
.completeTest();
59 <body onload=
"runTest()">
61 Tests that editing is canceled properly after incremental editing.
64 <div id=
"inspected" style=
"color: red">Text
</div>
65 <div id=
"other"></div>