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 WebInspector.inspectorView.showPanel("elements"); | 9 WebInspector.inspectorView.showPanel("elements"); |
10 InspectorTest.selectNodeWithId("inspected", execute); | 10 InspectorTest.selectNodeWithId("inspected", execute); |
11 | 11 |
12 function execute() | 12 function execute() |
13 { | 13 { |
14 var treeElement = WebInspector.panels.elements.treeOutline.findTreeEleme
nt(InspectorTest.expandedNodeWithId("inspected")); | 14 var treeElement = InspectorTest.firstElementsTreeOutline().findTreeEleme
nt(InspectorTest.expandedNodeWithId("inspected")); |
15 var textElement = treeElement.listItemElement.getElementsByClassName("we
bkit-html-attribute")[0]; | 15 var textElement = treeElement.listItemElement.getElementsByClassName("we
bkit-html-attribute")[0]; |
16 InspectorTest.addResult("Original textContent"); | 16 InspectorTest.addResult("Original textContent"); |
17 InspectorTest.addResult(treeElement.title.textContent); | 17 InspectorTest.addResult(treeElement.title.textContent); |
18 | 18 |
19 treeElement._startEditingTarget(textElement); | 19 treeElement._startEditingTarget(textElement); |
20 InspectorTest.addResult("textContent when editing 'href'"); | 20 InspectorTest.addResult("textContent when editing 'href'"); |
21 InspectorTest.addResult(treeElement.title.textContent); | 21 InspectorTest.addResult(treeElement.title.textContent); |
22 | 22 |
23 textElement.dispatchEvent(InspectorTest.createKeyEvent("U+0009")); | 23 textElement.dispatchEvent(InspectorTest.createKeyEvent("U+0009")); |
24 InspectorTest.addResult("textContent after moving to 'id'"); | 24 InspectorTest.addResult("textContent after moving to 'id'"); |
(...skipping 14 matching lines...) Expand all Loading... |
39 <body onload="runTest()"> | 39 <body onload="runTest()"> |
40 <p> | 40 <p> |
41 Tests that user can mutate DOM by means of elements panel. | 41 Tests that user can mutate DOM by means of elements panel. |
42 </p> | 42 </p> |
43 | 43 |
44 <div> | 44 <div> |
45 <a href="data:text/plain;,12345678901234567890123456789012345678901234567890
123456789012345678901234567890/1234567890123456789012345678901234567890123456789
01234567890" id="inspected">Anchor</a> | 45 <a href="data:text/plain;,12345678901234567890123456789012345678901234567890
123456789012345678901234567890/1234567890123456789012345678901234567890123456789
01234567890" id="inspected">Anchor</a> |
46 </div> | 46 </div> |
47 </body> | 47 </body> |
48 </html> | 48 </html> |
OLD | NEW |