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 = WebInspector.domBreakpointsSidebarPane; | 10 var pane = WebInspector.domBreakpointsSidebarPane; |
12 InspectorTest.runDebuggerTestSuite([ | 11 InspectorTest.runDebuggerTestSuite([ |
13 function testRemoveNode(next) | 12 function testRemoveNode(next) |
14 { | 13 { |
15 InspectorTest.addResult("Testing NodeRemoved DOM breakpoint."); | 14 InspectorTest.addResult("Testing NodeRemoved DOM breakpoint."); |
16 InspectorTest.nodeWithId("elementToRemove", step2); | 15 InspectorTest.nodeWithId("elementToRemove", step2); |
17 | 16 |
18 function step2(node) | 17 function step2(node) |
19 { | 18 { |
20 pane._setBreakpoint(node, pane._breakpointTypes.NodeRemoved, tru
e); | 19 WebInspector.domBreakpointManager.setBreakpoint(node, pane._brea
kpointTypes.NodeRemoved, true); |
21 InspectorTest.addResult("Set NodeRemoved DOM breakpoint."); | 20 InspectorTest.addResult("Set NodeRemoved DOM breakpoint."); |
22 node.removeNode(next); | 21 node.removeNode(next); |
23 } | 22 } |
24 }, | 23 }, |
25 | 24 |
26 function testModifyAttribute(next) | 25 function testModifyAttribute(next) |
27 { | 26 { |
28 InspectorTest.addResult("Testing AttributeModified DOM breakpoint.")
; | 27 InspectorTest.addResult("Testing AttributeModified DOM breakpoint.")
; |
29 InspectorTest.nodeWithId("rootElement", step2); | 28 InspectorTest.nodeWithId("rootElement", step2); |
30 | 29 |
31 function step2(node) | 30 function step2(node) |
32 { | 31 { |
33 pane._setBreakpoint(node, pane._breakpointTypes.AttributeModifie
d, true); | 32 WebInspector.domBreakpointManager.setBreakpoint(node, pane._brea
kpointTypes.AttributeModified, true); |
34 InspectorTest.addResult("Set AttributeModified DOM breakpoint.")
; | 33 InspectorTest.addResult("Set AttributeModified DOM breakpoint.")
; |
35 node.setAttribute("title", "a title", next); | 34 node.setAttribute("title", "a title", next); |
36 } | 35 } |
37 } | 36 } |
38 ]); | 37 ]); |
39 } | 38 } |
40 | 39 |
41 </script> | 40 </script> |
42 </head> | 41 </head> |
43 | 42 |
44 <body onload="runTest()"> | 43 <body onload="runTest()"> |
45 <p> | 44 <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> | 45 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> | 46 </p> |
48 | 47 |
49 <div id="rootElement" style="color: red"> | 48 <div id="rootElement" style="color: red"> |
50 <div id="elementToRemove"></div> | 49 <div id="elementToRemove"></div> |
51 </div> | 50 </div> |
52 | 51 |
53 </body> | 52 </body> |
54 </html> | 53 </html> |
OLD | NEW |