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.addResult("Before append:");
18 InspectorTest.dumpSelectedElementStyles(true);
19 section = WebInspector.panels.elements.sidebarPanes.styles.sections[0][1];
22 // Create and increment.
23 treeElement = section.addNewBlankProperty();
24 treeElement.startEditing();
25 treeElement.nameElement.textContent = "color";
26 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
28 // Update incrementally to a valid value.
29 treeElement.valueElement.textContent = "rgb(";
30 treeElement.kickFreeFlowStyleEditForTest();
31 InspectorTest.runAfterPendingDispatches(step2);
36 // Commit invalid value.
37 treeElement.valueElement.textContent = "rgb(1";
38 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
39 InspectorTest.runAfterPendingDispatches(step3);
44 InspectorTest.selectNodeWithId("other");
45 InspectorTest.runAfterPendingDispatches(step4);
50 InspectorTest.selectNodeAndWaitForStyles("inspected", step5);
55 InspectorTest.addResult("After append:");
56 InspectorTest.dumpSelectedElementStyles(true);
57 InspectorTest.completeTest();
64 <body onload="runTest()">
66 Tests that adding an invalid property retains its syntax.
69 <div id="inspected" style="font-size: 12px">Text</div>
70 <div id="other"></div>