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 var containerNode; | 9 var containerNode; |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 function testDragAndDrop(next) | 25 function testDragAndDrop(next) |
26 { | 26 { |
27 var treeOutline = WebInspector.panels.elements.treeOutline; | 27 var treeOutline = WebInspector.panels.elements.treeOutline; |
28 treeOutline.addEventListener(WebInspector.ElementsTreeOutline.Events
.SelectedNodeChanged, selectionChanged); | 28 treeOutline.addEventListener(WebInspector.ElementsTreeOutline.Events
.SelectedNodeChanged, selectionChanged); |
29 | 29 |
30 function selectionChanged() | 30 function selectionChanged() |
31 { | 31 { |
32 InspectorTest.addResult("===== Moved child2 ====="); | 32 InspectorTest.addResult("===== Moved child2 ====="); |
33 InspectorTest.dumpElementsTree(containerNode); | 33 InspectorTest.dumpElementsTree(containerNode); |
34 InspectorTest.addResult("Selection: " + treeOutline.selectedDOMN
ode().appropriateSelectorFor()); | 34 InspectorTest.addResult("Selection: " + WebInspector.DOMPresenta
tionUtils.appropriateSelectorFor(treeOutline.selectedDOMNode())); |
35 next(); | 35 next(); |
36 } | 36 } |
37 | 37 |
38 treeOutline._treeElementBeingDragged = treeOutline.getCachedTreeElem
ent(InspectorTest.expandedNodeWithId("child2")); | 38 treeOutline._treeElementBeingDragged = treeOutline.getCachedTreeElem
ent(InspectorTest.expandedNodeWithId("child2")); |
39 var treeElementToDropOn = treeOutline.getCachedTreeElement(Inspector
Test.expandedNodeWithId("child4")); | 39 var treeElementToDropOn = treeOutline.getCachedTreeElement(Inspector
Test.expandedNodeWithId("child4")); |
40 treeOutline._doMove(treeElementToDropOn); | 40 treeOutline._doMove(treeElementToDropOn); |
41 } | 41 } |
42 ]); | 42 ]); |
43 } | 43 } |
44 | 44 |
45 </script> | 45 </script> |
46 </head> | 46 </head> |
47 | 47 |
48 <body onload="runTest()"> | 48 <body onload="runTest()"> |
49 <p> | 49 <p> |
50 Tests elements drag and drop operation internals, verifies post-move selection. | 50 Tests elements drag and drop operation internals, verifies post-move selection. |
51 </p> | 51 </p> |
52 | 52 |
53 <div id="container"> | 53 <div id="container"> |
54 <div id="child1"></div> | 54 <div id="child1"></div> |
55 <div id="child2"></div> | 55 <div id="child2"></div> |
56 <div id="child3"></div> | 56 <div id="child3"></div> |
57 <div id="child4"></div> | 57 <div id="child4"></div> |
58 </div> | 58 </div> |
59 | 59 |
60 </body> | 60 </body> |
61 </html> | 61 </html> |
OLD | NEW |