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.addResult("Before append:");
17 InspectorTest.dumpSelectedElementStyles(true);
18 section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][1];
21 // Create and increment.
22 treeElement = section.addNewBlankProperty();
23 treeElement.startEditing();
24 treeElement.nameElement.textContent = "color";
25 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
27 // Update incrementally to a valid value.
28 treeElement.valueElement.textContent = "rgb(";
29 treeElement.kickFreeFlowStyleEditForTest();
30 InspectorTest.waitForStyleApplied(step2);
35 // Commit invalid value.
36 treeElement.valueElement.textContent = "rgb(1";
37 InspectorTest.waitForStyleApplied(step3);
38 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
43 InspectorTest.selectNodeWithId("other", step4);
48 InspectorTest.selectNodeAndWaitForStyles("inspected", step5);
53 InspectorTest.addResult("After append:");
54 InspectorTest.dumpSelectedElementStyles(true);
55 InspectorTest.completeTest();
62 <body onload="runTest()">
64 Tests that adding an invalid property retains its syntax.
67 <div id="inspected" style="font-size: 12px">Text</div>
68 <div id="other"></div>