| 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 src="../../../http/tests/inspector/debugger-test.js"></script> | 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 | |
| 11 var pane = Components.domBreakpointsSidebarPane; | |
| 12 InspectorTest.runDebuggerTestSuite([ | 10 InspectorTest.runDebuggerTestSuite([ |
| 13 function testRemoveNode(next) | 11 function testRemoveNode(next) |
| 14 { | 12 { |
| 15 InspectorTest.addResult("Testing NodeRemoved DOM breakpoint."); | 13 InspectorTest.addResult("Testing NodeRemoved DOM breakpoint."); |
| 16 InspectorTest.nodeWithId("elementToRemove", step2); | 14 InspectorTest.nodeWithId("elementToRemove", step2); |
| 17 | 15 |
| 18 function step2(node) | 16 function step2(node) |
| 19 { | 17 { |
| 20 pane._setBreakpoint(node, Components.DOMBreakpointsSidebarPane.B
reakpointTypes.NodeRemoved, true); | 18 InspectorTest.domDebuggerModel.setDOMBreakpoint(node, SDK.DOMDeb
uggerModel.DOMBreakpoint.Type.NodeRemoved); |
| 21 InspectorTest.addResult("Set NodeRemoved DOM breakpoint."); | 19 InspectorTest.addResult("Set NodeRemoved DOM breakpoint."); |
| 22 node.removeNode(next); | 20 node.removeNode(next); |
| 23 } | 21 } |
| 24 }, | 22 }, |
| 25 | 23 |
| 26 function testModifyAttribute(next) | 24 function testModifyAttribute(next) |
| 27 { | 25 { |
| 28 InspectorTest.addResult("Testing AttributeModified DOM breakpoint.")
; | 26 InspectorTest.addResult("Testing AttributeModified DOM breakpoint.")
; |
| 29 InspectorTest.nodeWithId("rootElement", step2); | 27 InspectorTest.nodeWithId("rootElement", step2); |
| 30 | 28 |
| 31 function step2(node) | 29 function step2(node) |
| 32 { | 30 { |
| 33 pane._setBreakpoint(node, Components.DOMBreakpointsSidebarPane.B
reakpointTypes.AttributeModified, true); | 31 InspectorTest.domDebuggerModel.setDOMBreakpoint(node, SDK.DOMDeb
uggerModel.DOMBreakpoint.Type.AttributeModified); |
| 34 InspectorTest.addResult("Set AttributeModified DOM breakpoint.")
; | 32 InspectorTest.addResult("Set AttributeModified DOM breakpoint.")
; |
| 35 node.setAttribute("title", "a title", next); | 33 node.setAttribute("title", "a title", next); |
| 36 } | 34 } |
| 37 } | 35 } |
| 38 ]); | 36 ]); |
| 39 } | 37 } |
| 40 | 38 |
| 41 </script> | 39 </script> |
| 42 </head> | 40 </head> |
| 43 | 41 |
| 44 <body onload="runTest()"> | 42 <body onload="runTest()"> |
| 45 <p> | 43 <p> |
| 46 Tests that DOM debugger will not crash when editing DOM nodes from the Web Inspe
ctor. <a href="https://code.google.com/p/chromium/issues/detail?id=249655">Chrom
ium bug 249655</a> | 44 Tests that DOM debugger will not crash when editing DOM nodes from the Web Inspe
ctor. <a href="https://code.google.com/p/chromium/issues/detail?id=249655">Chrom
ium bug 249655</a> |
| 47 </p> | 45 </p> |
| 48 | 46 |
| 49 <div id="rootElement" style="color: red"> | 47 <div id="rootElement" style="color: red"> |
| 50 <div id="elementToRemove"></div> | 48 <div id="elementToRemove"></div> |
| 51 </div> | 49 </div> |
| 52 | 50 |
| 53 </body> | 51 </body> |
| 54 </html> | 52 </html> |
| OLD | NEW |