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 SDK.DOMModel.Events) { | 25 for (var key in SDK.DOMModel.Events) { |
26 var eventName = SDK.DOMModel.Events[key]; | 26 var eventName = SDK.DOMModel.Events[key]; |
| 27 if (eventName === SDK.DOMModel.Events.MarkersChanged || eventName ==
= SDK.DOMModel.Events.DOMMutated) |
| 28 continue; |
27 InspectorTest.domModel.addEventListener(eventName, InspectorTest.rec
ordEvent.bind(InspectorTest, eventName)); | 29 InspectorTest.domModel.addEventListener(eventName, InspectorTest.rec
ordEvent.bind(InspectorTest, eventName)); |
28 } | 30 } |
29 | 31 |
30 next(); | 32 next(); |
31 } | 33 } |
32 } | 34 } |
33 | 35 |
34 InspectorTest.recordEvent = function(eventName, event) | 36 InspectorTest.recordEvent = function(eventName, event) |
35 { | 37 { |
36 if (!event.data || event.type === SDK.DOMModel.Events.MarkersChanged || even
t.type === SDK.DOMModel.Events.DOMMutated) | 38 if (!event.data) |
37 return; | 39 return; |
38 var node = event.data.node || event.data; | 40 var node = event.data.node || event.data; |
39 var parent = event.data.parent; | 41 var parent = event.data.parent; |
40 for (var currentNode = parent || node; currentNode; currentNode = currentNod
e.parentNode) { | 42 for (var currentNode = parent || node; currentNode; currentNode = currentNod
e.parentNode) { |
41 if (currentNode.getAttribute("id") === "output") | 43 if (currentNode.getAttribute("id") === "output") |
42 return; | 44 return; |
43 } | 45 } |
44 InspectorTest.events.push("Event " + eventName.toString() + ": " + node.node
Name()); | 46 InspectorTest.events.push("Event " + eventName.toString() + ": " + node.node
Name()); |
45 } | 47 } |
46 | 48 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 InspectorTest.addResult("==========8<=========="); | 104 InspectorTest.addResult("==========8<=========="); |
103 InspectorTest.addResult(text); | 105 InspectorTest.addResult(text); |
104 InspectorTest.addResult("==========>8=========="); | 106 InspectorTest.addResult("==========>8=========="); |
105 if (last) | 107 if (last) |
106 InspectorTest.addResult("\n\n\n"); | 108 InspectorTest.addResult("\n\n\n"); |
107 next(); | 109 next(); |
108 } | 110 } |
109 } | 111 } |
110 | 112 |
111 }; | 113 }; |
OLD | NEW |