| 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 src="edit-dom-test.js"></script> | 5 <script src="edit-dom-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 // Save time on style updates. | 10 // Save time on style updates. |
| 11 WebInspector.StylesSidebarPane.prototype.update = function() {}; | 11 Elements.StylesSidebarPane.prototype.update = function() {}; |
| 12 WebInspector.MetricsSidebarPane.prototype.update = function() {}; | 12 Elements.MetricsSidebarPane.prototype.update = function() {}; |
| 13 | 13 |
| 14 InspectorTest.runTestSuite([ | 14 InspectorTest.runTestSuite([ |
| 15 function testSetUp(next) | 15 function testSetUp(next) |
| 16 { | 16 { |
| 17 InspectorTest.expandElementsTree(next); | 17 InspectorTest.expandElementsTree(next); |
| 18 }, | 18 }, |
| 19 | 19 |
| 20 function testEditCommentAsHTML(next) | 20 function testEditCommentAsHTML(next) |
| 21 { | 21 { |
| 22 function commentNodeSelectionCallback(testNode, callback) | 22 function commentNodeSelectionCallback(testNode, callback) |
| 23 { | 23 { |
| 24 var childNodes = testNode.children(); | 24 var childNodes = testNode.children(); |
| 25 for (var i = 0; i < childNodes.length; ++i) { | 25 for (var i = 0; i < childNodes.length; ++i) { |
| 26 if (childNodes[i].nodeType() === 8) { | 26 if (childNodes[i].nodeType() === 8) { |
| 27 WebInspector.Revealer.reveal(childNodes[i]); | 27 Common.Revealer.reveal(childNodes[i]); |
| 28 callback(childNodes[i]); | 28 callback(childNodes[i]); |
| 29 return; | 29 return; |
| 30 } | 30 } |
| 31 } | 31 } |
| 32 InspectorTest.addResult("Comment node not found"); | 32 InspectorTest.addResult("Comment node not found"); |
| 33 InspectorTest.completeTest(); | 33 InspectorTest.completeTest(); |
| 34 } | 34 } |
| 35 InspectorTest.domActionTest("testEditCommentAsHTML", commentNodeSele
ctionCallback, testBody, next); | 35 InspectorTest.domActionTest("testEditCommentAsHTML", commentNodeSele
ctionCallback, testBody, next); |
| 36 | 36 |
| 37 function testBody(node, done) | 37 function testBody(node, done) |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 <div id="testEditCommentAsHTML"> | 90 <div id="testEditCommentAsHTML"> |
| 91 <!-- Comment --> | 91 <!-- Comment --> |
| 92 </div> | 92 </div> |
| 93 | 93 |
| 94 <div id="testEditAsHTML"> | 94 <div id="testEditAsHTML"> |
| 95 <div id="node-to-edit-as-html"><span id="span">Text</span></div> | 95 <div id="node-to-edit-as-html"><span id="span">Text</span></div> |
| 96 </div> | 96 </div> |
| 97 </div> | 97 </div> |
| 98 </body> | 98 </body> |
| 99 </html> | 99 </html> |
| OLD | NEW |