OLD | NEW |
| (Empty) |
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> | |
6 | |
7 function test() | |
8 { | |
9 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); | |
10 | |
11 var treeElement; | |
12 var section; | |
13 | |
14 function step1() | |
15 { | |
16 InspectorTest.addResult("Before append:"); | |
17 InspectorTest.dumpSelectedElementStyles(true); | |
18 section = InspectorTest.inlineStyleSection(); | |
19 | |
20 // Create and increment. | |
21 treeElement = section.addNewBlankProperty(); | |
22 treeElement.startEditing(); | |
23 treeElement.nameElement.textContent = "color"; | |
24 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Ente
r")); | |
25 | |
26 // Update incrementally to a valid value. | |
27 treeElement.valueElement.textContent = "rgb("; | |
28 treeElement.kickFreeFlowStyleEditForTest(); | |
29 InspectorTest.waitForStyleApplied(step2); | |
30 } | |
31 | |
32 function step2() | |
33 { | |
34 // Commit invalid value. | |
35 treeElement.valueElement.textContent = "rgb(1"; | |
36 InspectorTest.waitForStyleApplied(step3); | |
37 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent("Ent
er")); | |
38 } | |
39 | |
40 function step3() | |
41 { | |
42 InspectorTest.selectNodeWithId("other", step4); | |
43 } | |
44 | |
45 function step4() | |
46 { | |
47 InspectorTest.selectNodeAndWaitForStyles("inspected", step5); | |
48 } | |
49 | |
50 function step5() | |
51 { | |
52 InspectorTest.addResult("After append:"); | |
53 InspectorTest.dumpSelectedElementStyles(true); | |
54 InspectorTest.completeTest(); | |
55 } | |
56 } | |
57 | |
58 </script> | |
59 </head> | |
60 | |
61 <body onload="runTest()"> | |
62 <p> | |
63 Tests that adding an invalid property retains its syntax. | |
64 </p> | |
65 | |
66 <div id="inspected" style="font-size: 12px">Text</div> | |
67 <div id="other"></div> | |
68 | |
69 </body> | |
70 </html> | |
OLD | NEW |