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 insertBeforeFirst() | 7 function insertBeforeFirst() |
8 { | 8 { |
9 var container = document.getElementById("container"); | 9 var container = document.getElementById("container"); |
10 var child = document.createElement("div"); | 10 var child = document.createElement("div"); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 InspectorTest.evaluateInPage("appendChild()", callback); | 96 InspectorTest.evaluateInPage("appendChild()", callback); |
97 }, | 97 }, |
98 | 98 |
99 function testAppendWithText(next) | 99 function testAppendWithText(next) |
100 { | 100 { |
101 function callback() | 101 function callback() |
102 { | 102 { |
103 InspectorTest.addResult("======== Appended with text========="); | 103 InspectorTest.addResult("======== Appended with text========="); |
104 InspectorTest.dumpElementsTree(containerNode); | 104 InspectorTest.dumpElementsTree(containerNode); |
105 var newNode = InspectorTest.expandedNodeWithId("child-with-text"
); | 105 var newNode = InspectorTest.expandedNodeWithId("child-with-text"
); |
106 if (WebInspector.domModel.nodeForId(newNode.firstChild.id)) | 106 if (InspectorTest.domModel.nodeForId(newNode.firstChild.id)) |
107 InspectorTest.addResult("Success: child text is bound"); | 107 InspectorTest.addResult("Success: child text is bound"); |
108 else | 108 else |
109 InspectorTest.addResult("Failed: child text is not bound"); | 109 InspectorTest.addResult("Failed: child text is not bound"); |
110 next(); | 110 next(); |
111 } | 111 } |
112 InspectorTest.evaluateInPage("appendChildWithText()", callback); | 112 InspectorTest.evaluateInPage("appendChildWithText()", callback); |
113 }, | 113 }, |
114 | 114 |
115 function testInsertFirstTextNode(next) | 115 function testInsertFirstTextNode(next) |
116 { | 116 { |
117 function callback() | 117 function callback() |
118 { | 118 { |
119 InspectorTest.addResult("======== Inserted first text node =====
===="); | 119 InspectorTest.addResult("======== Inserted first text node =====
===="); |
120 InspectorTest.expandElementsTree(callback2); | 120 InspectorTest.expandElementsTree(callback2); |
121 } | 121 } |
122 | 122 |
123 function callback2() | 123 function callback2() |
124 { | 124 { |
125 InspectorTest.dumpElementsTree(containerNode); | 125 InspectorTest.dumpElementsTree(containerNode); |
126 var newNode = InspectorTest.expandedNodeWithId("child3"); | 126 var newNode = InspectorTest.expandedNodeWithId("child3"); |
127 if (WebInspector.domModel.nodeForId(newNode.firstChild.id)) | 127 if (InspectorTest.domModel.nodeForId(newNode.firstChild.id)) |
128 InspectorTest.addResult("Success: child text is bound"); | 128 InspectorTest.addResult("Success: child text is bound"); |
129 else | 129 else |
130 InspectorTest.addResult("Failed: child text is not bound"); | 130 InspectorTest.addResult("Failed: child text is not bound"); |
131 next(); | 131 next(); |
132 } | 132 } |
133 InspectorTest.evaluateInPage("insertFirstTextNode()", callback); | 133 InspectorTest.evaluateInPage("insertFirstTextNode()", callback); |
134 } | 134 } |
135 ]); | 135 ]); |
136 } | 136 } |
137 | 137 |
138 </script> | 138 </script> |
139 </head> | 139 </head> |
140 | 140 |
141 <body onload="runTest()"> | 141 <body onload="runTest()"> |
142 <p> | 142 <p> |
143 Tests that elements panel updates dom tree structure upon node insertion. | 143 Tests that elements panel updates dom tree structure upon node insertion. |
144 </p> | 144 </p> |
145 | 145 |
146 <div id="container"><div id="child1"></div><div id="child2"></div><div id="child
3"></div></div> | 146 <div id="container"><div id="child1"></div><div id="child2"></div><div id="child
3"></div></div> |
147 | 147 |
148 </body> | 148 </body> |
149 </html> | 149 </html> |
OLD | NEW |