| 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(name, value) | 7 function setAttribute(name, value) |
| 8 { | 8 { |
| 9 var node = document.getElementById("node"); | 9 var node = document.getElementById("node"); |
| 10 node.setAttribute(name, value); | 10 node.setAttribute(name, value); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 }, | 45 }, |
| 46 | 46 |
| 47 function testRemoveAttribute(next) { | 47 function testRemoveAttribute(next) { |
| 48 function callback() | 48 function callback() |
| 49 { | 49 { |
| 50 InspectorTest.addResult("=== Removed attribute ==="); | 50 InspectorTest.addResult("=== Removed attribute ==="); |
| 51 InspectorTest.dumpElementsTree(targetNode); | 51 InspectorTest.dumpElementsTree(targetNode); |
| 52 next(); | 52 next(); |
| 53 } | 53 } |
| 54 InspectorTest.evaluateInPage("removeAttribute('name')", callback); | 54 InspectorTest.evaluateInPage("removeAttribute('name')", callback); |
| 55 }, |
| 56 |
| 57 function testSetMalformedAttributeText(next) |
| 58 { |
| 59 function callback(error) |
| 60 { |
| 61 InspectorTest.addResult("Error: " + error.data[0]); |
| 62 WebInspector.domAgent.removeEventListener(WebInspector.DOMAgent.
Events.AttrModified, callback); |
| 63 InspectorTest.addResult("=== Set malformed attribute as text ===
"); |
| 64 InspectorTest.dumpElementsTree(targetNode); |
| 65 next(); |
| 66 } |
| 67 targetNode.setAttribute("foo2", "foo2='missingquote", callback); |
| 55 } | 68 } |
| 56 ]); | 69 ]); |
| 57 } | 70 } |
| 58 | 71 |
| 59 </script> | 72 </script> |
| 60 </head> | 73 </head> |
| 61 | 74 |
| 62 <body onload="runTest()"> | 75 <body onload="runTest()"> |
| 63 <p> | 76 <p> |
| 64 Tests that elements panel updates dom tree structure upon setting attribute. | 77 Tests that elements panel updates dom tree structure upon setting attribute. |
| 65 </p> | 78 </p> |
| 66 | 79 |
| 67 <div id="node"></div> | 80 <div id="node"></div> |
| 68 | 81 |
| 69 </body> | 82 </body> |
| 70 </html> | 83 </html> |
| OLD | NEW |