| 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 setAttribute(namespace, name, value) | 7 function setAttribute(namespace, name, value) |
| 8 { | 8 { |
| 9 var node = document.getElementById("node"); | 9 var node = document.getElementById("node"); |
| 10 node.setAttributeNS(namespace, name, value); | 10 node.setAttributeNS(namespace, name, value); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 InspectorTest.dumpElementsTree(targetNode); | 30 InspectorTest.dumpElementsTree(targetNode); |
| 31 next(); | 31 next(); |
| 32 } | 32 } |
| 33 InspectorTest.selectNodeWithId("node", callback); | 33 InspectorTest.selectNodeWithId("node", callback); |
| 34 }, | 34 }, |
| 35 | 35 |
| 36 function testAttributeUpdated(next) | 36 function testAttributeUpdated(next) |
| 37 { | 37 { |
| 38 function callback() | 38 function callback() |
| 39 { | 39 { |
| 40 WebInspector.domModel.removeEventListener(WebInspector.DOMModel.
Events.AttrModified, callback); | 40 InspectorTest.domModel.removeEventListener(WebInspector.DOMModel
.Events.AttrModified, callback); |
| 41 InspectorTest.addResult("===== On attribute set ====="); | 41 InspectorTest.addResult("===== On attribute set ====="); |
| 42 InspectorTest.dumpElementsTree(targetNode); | 42 InspectorTest.dumpElementsTree(targetNode); |
| 43 next(); | 43 next(); |
| 44 } | 44 } |
| 45 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.
AttrModified, callback); | 45 InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events
.AttrModified, callback); |
| 46 InspectorTest.evaluateInPage("setAttribute('http://www.w3.org/1999/x
link', 'xlink:href', 'changed-url')"); | 46 InspectorTest.evaluateInPage("setAttribute('http://www.w3.org/1999/x
link', 'xlink:href', 'changed-url')"); |
| 47 }, | 47 }, |
| 48 | 48 |
| 49 function testAttributeRemoved(next) | 49 function testAttributeRemoved(next) |
| 50 { | 50 { |
| 51 function callback() | 51 function callback() |
| 52 { | 52 { |
| 53 WebInspector.domModel.removeEventListener(WebInspector.DOMModel.
Events.AttrRemoved, callback); | 53 InspectorTest.domModel.removeEventListener(WebInspector.DOMModel
.Events.AttrRemoved, callback); |
| 54 InspectorTest.addResult("=== On attribute removed ==="); | 54 InspectorTest.addResult("=== On attribute removed ==="); |
| 55 InspectorTest.dumpElementsTree(targetNode); | 55 InspectorTest.dumpElementsTree(targetNode); |
| 56 next(); | 56 next(); |
| 57 } | 57 } |
| 58 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.
AttrRemoved, callback); | 58 InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events
.AttrRemoved, callback); |
| 59 InspectorTest.evaluateInPage("removeAttribute('xlink:href')"); | 59 InspectorTest.evaluateInPage("removeAttribute('xlink:href')"); |
| 60 }, | 60 }, |
| 61 ]); | 61 ]); |
| 62 } | 62 } |
| 63 | 63 |
| 64 </script> | 64 </script> |
| 65 </head> | 65 </head> |
| 66 <body onload="runTest()"> | 66 <body onload="runTest()"> |
| 67 <p>Tests that elements panel updates dom tree structure upon changing the attrib
ute with namespace.</p> | 67 <p>Tests that elements panel updates dom tree structure upon changing the attrib
ute with namespace.</p> |
| 68 <svg> | 68 <svg> |
| 69 <a id="node" xlink:href="http://localhost">link</a> | 69 <a id="node" xlink:href="http://localhost">link</a> |
| 70 </svg> | 70 </svg> |
| 71 </body> | 71 </body> |
| 72 </html> | 72 </html> |
| OLD | NEW |