| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/elements-test.js"></script> | 4 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function test() | 7 function test() |
| 8 { | 8 { |
| 9 InspectorTest.selectNodeAndWaitForStyles("inspected", testEmulateKeypress); | 9 InspectorTest.selectNodeAndWaitForStyles("inspected", testEmulateKeypress); |
| 10 | 10 |
| 11 function testEmulateKeypress() | 11 function testEmulateKeypress() |
| 12 { | 12 { |
| 13 var treeElement = InspectorTest.getMatchedStylePropertyTreeItem("font-si
ze"); | 13 var treeElement = InspectorTest.getMatchedStylePropertyTreeItem("font-si
ze"); |
| 14 treeElement.startEditing(treeElement.valueElement); | 14 treeElement.startEditing(treeElement.valueElement); |
| 15 var selection = window.getSelection(); | 15 var selection = treeElement.valueElement.getComponentSelection(); |
| 16 var range = selection.getRangeAt(0); | 16 var range = selection.getRangeAt(0); |
| 17 var newRange = document.createRange(); | 17 var newRange = document.createRange(); |
| 18 newRange.setStart(range.startContainer, 1); | 18 newRange.setStart(range.startContainer, 1); |
| 19 newRange.setEnd(range.startContainer, 1); | 19 newRange.setEnd(range.startContainer, 1); |
| 20 selection.removeAllRanges(); | 20 selection.removeAllRanges(); |
| 21 selection.addRange(newRange); | 21 selection.addRange(newRange); |
| 22 // Use eventSender to emit "input" event. | 22 // Use eventSender to emit "input" event. |
| 23 eventSender.keyDown("1"); | 23 eventSender.keyDown("1"); |
| 24 InspectorTest.waitForStyleApplied(onStyleApplied); | 24 InspectorTest.waitForStyleApplied(onStyleApplied); |
| 25 } | 25 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 51 | 51 |
| 52 <body onload="runTest()"> | 52 <body onload="runTest()"> |
| 53 <p> | 53 <p> |
| 54 Verifies that property value editing triggers style update in rendering engine. | 54 Verifies that property value editing triggers style update in rendering engine. |
| 55 </p> | 55 </p> |
| 56 | 56 |
| 57 <div id="inspected" style="font-size: 19px"></div> | 57 <div id="inspected" style="font-size: 19px"></div> |
| 58 | 58 |
| 59 </body> | 59 </body> |
| 60 </html> | 60 </html> |
| OLD | NEW |