Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / styles-3 / styles-add-invalid-property.html
blob5b050e9f9dcd8305210712682ec184b85a69a9a0
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script>
7 function test()
9 InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
11 var treeElement;
12 var section;
14 function step1()
16 InspectorTest.addResult("Before append:");
17 InspectorTest.dumpSelectedElementStyles(true);
18 section = InspectorTest.inlineStyleSection();
20 // Create and increment.
21 treeElement = section.addNewBlankProperty();
22 treeElement.startEditing();
23 treeElement.nameElement.textContent = "color";
24 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
26 // Update incrementally to a valid value.
27 treeElement.valueElement.textContent = "rgb(";
28 treeElement.kickFreeFlowStyleEditForTest();
29 InspectorTest.waitForStyleApplied(step2);
32 function step2()
34 // Commit invalid value.
35 treeElement.valueElement.textContent = "rgb(1";
36 InspectorTest.waitForStyleApplied(step3);
37 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
40 function step3()
42 InspectorTest.selectNodeWithId("other", step4);
45 function step4()
47 InspectorTest.selectNodeAndWaitForStyles("inspected", step5);
50 function step5()
52 InspectorTest.addResult("After append:");
53 InspectorTest.dumpSelectedElementStyles(true);
54 InspectorTest.completeTest();
58 </script>
59 </head>
61 <body onload="runTest()">
62 <p>
63 Tests that adding an invalid property retains its syntax.
64 </p>
66 <div id="inspected" style="font-size: 12px">Text</div>
67 <div id="other"></div>
69 </body>
70 </html>