3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/elements-test.js"></script>
15 InspectorTest
.selectNodeAndWaitForStyles("inspected", editProperty
);
17 function editProperty()
19 treeElement
= InspectorTest
.getMatchedStylePropertyTreeItem("color");
20 InspectorTest
.dumpSelectedElementStyles(true, false, true);
21 treeElement
.startEditing();
22 treeElement
.nameElement
.textContent
= "color";
23 treeElement
.nameElement
.dispatchEvent(InspectorTest
.createKeyEvent("Enter"));
24 treeElement
.valueElement
.textContent
= "red";
25 InspectorTest
.waitForStyleApplied(commitInvalidProperty
);
26 treeElement
.kickFreeFlowStyleEditForTest();
29 function commitInvalidProperty()
31 treeElement
.valueElement
.textContent
= "red/*";
32 treeElement
.valueElement
.dispatchEvent(InspectorTest
.createKeyEvent("Enter"));
33 InspectorTest
.waitForStyleApplied(invalidCommitted
);
36 function invalidCommitted()
38 InspectorTest
.waitForStyleApplied(dumpAndExit
);
41 function dumpAndExit()
43 InspectorTest
.dumpSelectedElementStyles(true, false, true);
44 InspectorTest
.completeTest();
51 <body onload=
"runTest()">
53 Verifies that entering poor property value restores original text.
56 <div id=
"inspected">Text
</div>