Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: LayoutTests/inspector/elements/edit-dom-test.js

Issue 218703002: DevTools: [wip] move Elements panel off WebInspector.domModel and single tree outline. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comment addressed (and much more) Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 function initialize_EditDOMTests() 1 function initialize_EditDOMTests()
2 { 2 {
3 3
4 InspectorTest.doAddAttribute = function(testName, dataNodeId, attributeText, nex t) 4 InspectorTest.doAddAttribute = function(testName, dataNodeId, attributeText, nex t)
5 { 5 {
6 InspectorTest.domActionTestForNodeId(testName, dataNodeId, testBody, next); 6 InspectorTest.domActionTestForNodeId(testName, dataNodeId, testBody, next);
7 7
8 function testBody(node, done) 8 function testBody(node, done)
9 { 9 {
10 var editorElement = InspectorTest.editNodePart(node, "webkit-html-attrib ute"); 10 var editorElement = InspectorTest.editNodePart(node, "webkit-html-attrib ute");
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 function step2() 52 function step2()
53 { 53 {
54 InspectorTest.addResult("==== after ===="); 54 InspectorTest.addResult("==== after ====");
55 InspectorTest.dumpElementsTree(testNode); 55 InspectorTest.dumpElementsTree(testNode);
56 next(); 56 next();
57 } 57 }
58 } 58 }
59 59
60 InspectorTest.editNodePart = function(node, className) 60 InspectorTest.editNodePart = function(node, className)
61 { 61 {
62 var treeElement = WebInspector.panels.elements.treeOutline.findTreeElement(n ode); 62 var treeElement = InspectorTest.firstElementsTreeOutline().findTreeElement(n ode);
63 var textElement = treeElement.listItemElement.getElementsByClassName(classNa me)[0]; 63 var textElement = treeElement.listItemElement.getElementsByClassName(classNa me)[0];
64 if (!textElement && treeElement.childrenListElement) 64 if (!textElement && treeElement.childrenListElement)
65 textElement = treeElement.childrenListElement.getElementsByClassName(cla ssName)[0]; 65 textElement = treeElement.childrenListElement.getElementsByClassName(cla ssName)[0];
66 treeElement._startEditingTarget(textElement); 66 treeElement._startEditingTarget(textElement);
67 return textElement; 67 return textElement;
68 } 68 }
69 69
70 InspectorTest.editNodePartAndRun = function(node, className, newValue, step2, us eSniffer) 70 InspectorTest.editNodePartAndRun = function(node, className, newValue, step2, us eSniffer)
71 { 71 {
72 var editorElement = InspectorTest.editNodePart(node, className); 72 var editorElement = InspectorTest.editNodePart(node, className);
73 editorElement.textContent = newValue; 73 editorElement.textContent = newValue;
74 editorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter")); 74 editorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
75 if (useSniffer) 75 if (useSniffer)
76 InspectorTest.addSniffer(WebInspector.ElementsTreeUpdater.prototype, "_u pdateModifiedNodes", step2); 76 InspectorTest.addSniffer(WebInspector.ElementsTreeUpdater.prototype, "_u pdateModifiedNodes", step2);
77 else 77 else
78 InspectorTest.runAfterPendingDispatches(step2); 78 InspectorTest.runAfterPendingDispatches(step2);
79 } 79 }
80 80
81 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698