| OLD | NEW |
| 1 var initialize_SetOuterHTMLTest = function() { | 1 var initialize_SetOuterHTMLTest = function() { |
| 2 | 2 |
| 3 InspectorTest.events = []; | 3 InspectorTest.events = []; |
| 4 InspectorTest.containerId; | 4 InspectorTest.containerId; |
| 5 | 5 |
| 6 InspectorTest.setUpTestSuite = function(next) | 6 InspectorTest.setUpTestSuite = function(next) |
| 7 { | 7 { |
| 8 InspectorTest.expandElementsTree(step1); | 8 InspectorTest.expandElementsTree(step1); |
| 9 | 9 |
| 10 function step1() | 10 function step1() |
| 11 { | 11 { |
| 12 InspectorTest.selectNodeWithId("container", step2); | 12 InspectorTest.selectNodeWithId("container", step2); |
| 13 } | 13 } |
| 14 | 14 |
| 15 function step2(node) | 15 function step2(node) |
| 16 { | 16 { |
| 17 InspectorTest.containerId = node.id; | 17 InspectorTest.containerId = node.id; |
| 18 InspectorTest.DOMAgent.getOuterHTML(InspectorTest.containerId, step3); | 18 InspectorTest.DOMAgent.getOuterHTML(InspectorTest.containerId, step3); |
| 19 } | 19 } |
| 20 | 20 |
| 21 function step3(error, text) | 21 function step3(error, text) |
| 22 { | 22 { |
| 23 InspectorTest.containerText = text; | 23 InspectorTest.containerText = text; |
| 24 | 24 |
| 25 for (var key in WebInspector.DOMModel.Events) { | 25 for (var key in SDK.DOMModel.Events) { |
| 26 var eventName = WebInspector.DOMModel.Events[key]; | 26 var eventName = SDK.DOMModel.Events[key]; |
| 27 InspectorTest.domModel.addEventListener(eventName, InspectorTest.rec
ordEvent.bind(InspectorTest, eventName)); | 27 InspectorTest.domModel.addEventListener(eventName, InspectorTest.rec
ordEvent.bind(InspectorTest, eventName)); |
| 28 } | 28 } |
| 29 | 29 |
| 30 next(); | 30 next(); |
| 31 } | 31 } |
| 32 } | 32 } |
| 33 | 33 |
| 34 InspectorTest.recordEvent = function(eventName, event) | 34 InspectorTest.recordEvent = function(eventName, event) |
| 35 { | 35 { |
| 36 if (!event.data || event.type === WebInspector.DOMModel.Events.MarkersChange
d || event.type === WebInspector.DOMModel.Events.DOMMutated) | 36 if (!event.data || event.type === SDK.DOMModel.Events.MarkersChanged || even
t.type === SDK.DOMModel.Events.DOMMutated) |
| 37 return; | 37 return; |
| 38 var node = event.data.node || event.data; | 38 var node = event.data.node || event.data; |
| 39 var parent = event.data.parent; | 39 var parent = event.data.parent; |
| 40 for (var currentNode = parent || node; currentNode; currentNode = currentNod
e.parentNode) { | 40 for (var currentNode = parent || node; currentNode; currentNode = currentNod
e.parentNode) { |
| 41 if (currentNode.getAttribute("id") === "output") | 41 if (currentNode.getAttribute("id") === "output") |
| 42 return; | 42 return; |
| 43 } | 43 } |
| 44 InspectorTest.events.push("Event " + eventName.toString() + ": " + node.node
Name()); | 44 InspectorTest.events.push("Event " + eventName.toString() + ": " + node.node
Name()); |
| 45 } | 45 } |
| 46 | 46 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 InspectorTest.addResult("==========8<=========="); | 102 InspectorTest.addResult("==========8<=========="); |
| 103 InspectorTest.addResult(text); | 103 InspectorTest.addResult(text); |
| 104 InspectorTest.addResult("==========>8=========="); | 104 InspectorTest.addResult("==========>8=========="); |
| 105 if (last) | 105 if (last) |
| 106 InspectorTest.addResult("\n\n\n"); | 106 InspectorTest.addResult("\n\n\n"); |
| 107 next(); | 107 next(); |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 }; | 111 }; |
| OLD | NEW |