OLD | NEW |
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"); |
11 editorElement.dispatchEvent(InspectorTest.createKeyEvent("U+0009")); //
Tab | 11 editorElement.dispatchEvent(InspectorTest.createKeyEvent("U+0009")); //
Tab |
12 | 12 |
13 InspectorTest.runAfterPendingDispatches(testContinuation); | 13 InspectorTest.runAfterPendingDispatches(testContinuation); |
14 | 14 |
15 function testContinuation() | 15 function testContinuation() |
16 { | 16 { |
17 var editorElement = window.getSelection().anchorNode.parentElement; | 17 var editorElement = WebInspector.panels.elements._treeOutlines[0]._s
hadowRoot.getSelection().anchorNode.parentElement; |
18 editorElement.textContent = attributeText; | 18 editorElement.textContent = attributeText; |
19 editorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter")); | 19 editorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter")); |
20 InspectorTest.addSniffer(WebInspector.ElementsTreeUpdater.prototype,
"_updateModifiedNodes", done); | 20 InspectorTest.addSniffer(WebInspector.ElementsTreeUpdater.prototype,
"_updateModifiedNodes", done); |
21 } | 21 } |
22 } | 22 } |
23 } | 23 } |
24 | 24 |
25 InspectorTest.domActionTestForNodeId = function(testName, dataNodeId, testBody,
next) | 25 InspectorTest.domActionTestForNodeId = function(testName, dataNodeId, testBody,
next) |
26 { | 26 { |
27 function callback(testNode, continuation) | 27 function callback(testNode, continuation) |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |