| 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 src="edit-dom-test.js"></script> |
| 6 <script> |
| 7 |
| 8 function test() |
| 9 { |
| 10 // Save time on style updates. |
| 11 WebInspector.StylesSidebarPane.prototype.update = function() {}; |
| 12 WebInspector.MetricsSidebarPane.prototype.update = function() {}; |
| 13 |
| 14 InspectorTest.runTestSuite([ |
| 15 function testSetUp(next) |
| 16 { |
| 17 InspectorTest.expandElementsTree(next); |
| 18 }, |
| 19 |
| 20 function testRemove(next) |
| 21 { |
| 22 InspectorTest.domActionTestForNodeId("testRemove", "node-to-remove",
testBody, next); |
| 23 |
| 24 function testBody(node, done) |
| 25 { |
| 26 var treeElement = InspectorTest.firstElementsTreeOutline().findT
reeElement(node); |
| 27 treeElement.remove(); |
| 28 InspectorTest.runAfterPendingDispatches(done); |
| 29 } |
| 30 }, |
| 31 |
| 32 function testSetNodeName(next) |
| 33 { |
| 34 InspectorTest.domActionTestForNodeId("testSetNodeName", "node-to-set
-name", testBody, next); |
| 35 |
| 36 function testBody(node, done) |
| 37 { |
| 38 InspectorTest.editNodePartAndRun(node, "webkit-html-tag-name", "
span", done); |
| 39 } |
| 40 }, |
| 41 |
| 42 function testSetNodeNameInput(next) |
| 43 { |
| 44 InspectorTest.domActionTestForNodeId("testSetNodeNameInput", "node-t
o-set-name-input", testBody, next); |
| 45 |
| 46 function testBody(node, done) |
| 47 { |
| 48 InspectorTest.editNodePartAndRun(node, "webkit-html-tag-name", "
input", done); |
| 49 } |
| 50 }, |
| 51 |
| 52 function testSetNodeValue(next) |
| 53 { |
| 54 InspectorTest.domActionTestForNodeId("testSetNodeValue", "node-to-se
t-value", testBody, next); |
| 55 |
| 56 function testBody(node, done) |
| 57 { |
| 58 InspectorTest.editNodePartAndRun(node, "webkit-html-text-node",
" \n Edited Text \n ", done); |
| 59 } |
| 60 }, |
| 61 ]); |
| 62 } |
| 63 |
| 64 </script> |
| 65 </head> |
| 66 |
| 67 <body onload="runTest()"> |
| 68 <p> |
| 69 Tests that user can mutate DOM by means of elements panel. |
| 70 </p> |
| 71 |
| 72 <div> |
| 73 <div id="testRemove"> |
| 74 <div id="node-to-remove"></div> |
| 75 </div> |
| 76 |
| 77 <div id="testSetNodeName"> |
| 78 <div id="node-to-set-name"></div> |
| 79 </div> |
| 80 |
| 81 <div id="testSetNodeNameInput"> |
| 82 <div id="node-to-set-name-input"></div> |
| 83 </div> |
| 84 |
| 85 <div id="testSetNodeValue"> |
| 86 <div id="node-to-set-value"> |
| 87 Text |
| 88 </div> |
| 89 </div> |
| 90 </div> |
| 91 </body> |
| 92 </html> |
| OLD | NEW |