| 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 | 9 |
| 10 var treeElement; | 10 var treeElement; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 treeElement.valueElement.textContent = "rgb(/*"; | 31 treeElement.valueElement.textContent = "rgb(/*"; |
| 32 InspectorTest.waitForStyleApplied(next); | 32 InspectorTest.waitForStyleApplied(next); |
| 33 treeElement.kickFreeFlowStyleEditForTest(); | 33 treeElement.kickFreeFlowStyleEditForTest(); |
| 34 }, | 34 }, |
| 35 | 35 |
| 36 function testCommitEditing(next) | 36 function testCommitEditing(next) |
| 37 { | 37 { |
| 38 // Commit editing. | 38 // Commit editing. |
| 39 treeElement.valueElement.textContent = "green"; | 39 treeElement.valueElement.textContent = "green"; |
| 40 treeElement.valueElement.firstChild.select(); | 40 treeElement.valueElement.firstChild.select(); |
| 41 InspectorTest.addSniffer(WebInspector.StylePropertiesSection.prototy
pe, "_afterUpdateFinishedForTest", next); | 41 InspectorTest.addSniffer(Elements.StylePropertiesSection.prototype,
"_afterUpdateFinishedForTest", next); |
| 42 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent(
"Enter")); | 42 treeElement.valueElement.dispatchEvent(InspectorTest.createKeyEvent(
"Enter")); |
| 43 }, | 43 }, |
| 44 | 44 |
| 45 function testNewPropertyEditorIsCreated(next) | 45 function testNewPropertyEditorIsCreated(next) |
| 46 { | 46 { |
| 47 var blankTreeElement = treeOutline.rootElement().childAt(1); | 47 var blankTreeElement = treeOutline.rootElement().childAt(1); |
| 48 if (!WebInspector.isBeingEdited(blankTreeElement.nameElement)) { | 48 if (!UI.isBeingEdited(blankTreeElement.nameElement)) { |
| 49 InspectorTest.addResult("No new property editor active!"); | 49 InspectorTest.addResult("No new property editor active!"); |
| 50 InspectorTest.completeTest(); | 50 InspectorTest.completeTest(); |
| 51 return; | 51 return; |
| 52 } | 52 } |
| 53 | 53 |
| 54 // Test Styles pane editor looping. | 54 // Test Styles pane editor looping. |
| 55 InspectorTest.addSniffer(WebInspector.StylePropertiesSection.prototy
pe, "_afterUpdateFinishedForTest", next); | 55 InspectorTest.addSniffer(Elements.StylePropertiesSection.prototype,
"_afterUpdateFinishedForTest", next); |
| 56 blankTreeElement.nameElement.dispatchEvent(InspectorTest.createKeyEv
ent("Enter")); | 56 blankTreeElement.nameElement.dispatchEvent(InspectorTest.createKeyEv
ent("Enter")); |
| 57 }, | 57 }, |
| 58 | 58 |
| 59 function testCycleThroughPropertyEditing(next) | 59 function testCycleThroughPropertyEditing(next) |
| 60 { | 60 { |
| 61 if (!WebInspector.isBeingEdited(treeOutline.firstChild().nameElement
)) { | 61 if (!UI.isBeingEdited(treeOutline.firstChild().nameElement)) { |
| 62 InspectorTest.addResult("Original property name editor not activ
e!"); | 62 InspectorTest.addResult("Original property name editor not activ
e!"); |
| 63 InspectorTest.completeTest(); | 63 InspectorTest.completeTest(); |
| 64 return; | 64 return; |
| 65 } | 65 } |
| 66 | 66 |
| 67 InspectorTest.selectNodeWithId("other", next); | 67 InspectorTest.selectNodeWithId("other", next); |
| 68 }, | 68 }, |
| 69 | 69 |
| 70 function testNodeStyles(next) | 70 function testNodeStyles(next) |
| 71 { | 71 { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 88 <body onload="runTest()"> | 88 <body onload="runTest()"> |
| 89 <p> | 89 <p> |
| 90 Tests that editing is canceled properly after incremental editing. | 90 Tests that editing is canceled properly after incremental editing. |
| 91 </p> | 91 </p> |
| 92 | 92 |
| 93 <div id="inspected" style="color: red">Text</div> | 93 <div id="inspected" style="color: red">Text</div> |
| 94 <div id="other"></div> | 94 <div id="other"></div> |
| 95 | 95 |
| 96 </body> | 96 </body> |
| 97 </html> | 97 </html> |
| OLD | NEW |