| 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", step1); | 9 InspectorTest.selectNodeAndWaitForStyles("inspected", step1); |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // Update incrementally, do not commit. | 23 // Update incrementally, do not commit. |
| 24 treeElement.valueElement.textContent = "green"; | 24 treeElement.valueElement.textContent = "green"; |
| 25 treeElement.kickFreeFlowStyleEditForTest(); | 25 treeElement.kickFreeFlowStyleEditForTest(); |
| 26 | 26 |
| 27 // Cancel editing. | 27 // Cancel editing. |
| 28 treeElement.valueElement.firstChild.select(); | 28 treeElement.valueElement.firstChild.select(); |
| 29 InspectorTest.waitForStyleApplied(onStyleApplied); | 29 InspectorTest.waitForStyleApplied(onStyleApplied); |
| 30 | 30 |
| 31 function onStyleApplied() | 31 function onStyleApplied() |
| 32 { | 32 { |
| 33 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent(
"U+001B")); // Escape | 33 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent(
"Escape")); |
| 34 InspectorTest.waitForStyleApplied(onStyleReverted); | 34 InspectorTest.waitForStyleApplied(onStyleReverted); |
| 35 } | 35 } |
| 36 | 36 |
| 37 function onStyleReverted() | 37 function onStyleReverted() |
| 38 { | 38 { |
| 39 InspectorTest.selectNodeWithId("other", step2); | 39 InspectorTest.selectNodeWithId("other", step2); |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 | 42 |
| 43 function step2() | 43 function step2() |
| (...skipping 15 matching lines...) Expand all Loading... |
| 59 <body onload="runTest()"> | 59 <body onload="runTest()"> |
| 60 <p> | 60 <p> |
| 61 Tests that editing is canceled properly after incremental editing. | 61 Tests that editing is canceled properly after incremental editing. |
| 62 </p> | 62 </p> |
| 63 | 63 |
| 64 <div id="inspected" style="color: red">Text</div> | 64 <div id="inspected" style="color: red">Text</div> |
| 65 <div id="other"></div> | 65 <div id="other"></div> |
| 66 | 66 |
| 67 </body> | 67 </body> |
| 68 </html> | 68 </html> |
| OLD | NEW |