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/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
5 | 5 |
6 <script> | 6 <script> |
7 function oneLineTestFunction() { return 0; } | 7 function oneLineTestFunction() { return 0; } |
8 </script> | 8 </script> |
9 | 9 |
10 <script> | 10 <script> |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 InspectorTest.assertTrue(!!error); | 112 InspectorTest.assertTrue(!!error); |
113 InspectorTest.assertTrue(!breakpointId); | 113 InspectorTest.assertTrue(!breakpointId); |
114 next(); | 114 next(); |
115 } | 115 } |
116 } | 116 } |
117 ]); | 117 ]); |
118 | 118 |
119 function setBreakpointAndWaitUntilPaused(sourceFrame, lineNumber, pausedCall
back) | 119 function setBreakpointAndWaitUntilPaused(sourceFrame, lineNumber, pausedCall
back) |
120 { | 120 { |
121 var expectedBreakpointId; | 121 var expectedBreakpointId; |
122 InspectorTest.addSniffer(WebInspector.BreakpointManager.Breakpoint.proto
type, "_didSetBreakpointInDebugger", didSetBreakpointInDebugger); | 122 InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBreakpoint
.prototype, "_didSetBreakpointInDebugger", didSetBreakpointInDebugger); |
123 InspectorTest.setBreakpoint(sourceFrame, lineNumber, "", true); | 123 InspectorTest.setBreakpoint(sourceFrame, lineNumber, "", true); |
124 | 124 |
125 function didSetBreakpointInDebugger(breakpointId) | 125 function didSetBreakpointInDebugger(breakpointId) |
126 { | 126 { |
127 expectedBreakpointId = breakpointId; | 127 expectedBreakpointId = breakpointId; |
128 InspectorTest.waitUntilPaused(didPause); | 128 InspectorTest.waitUntilPaused(didPause); |
129 } | 129 } |
130 | 130 |
131 function didPause(callFrames, reason, breakpointIds) | 131 function didPause(callFrames, reason, breakpointIds) |
132 { | 132 { |
133 InspectorTest.assertEquals(breakpointIds.length, 1); | 133 InspectorTest.assertEquals(breakpointIds.length, 1); |
134 InspectorTest.assertEquals(breakpointIds[0], expectedBreakpointId); | 134 InspectorTest.assertEquals(breakpointIds[0], expectedBreakpointId); |
135 InspectorTest.assertEquals(reason, "other"); | 135 InspectorTest.assertEquals(reason, "other"); |
136 | 136 |
137 pausedCallback(callFrames); | 137 pausedCallback(callFrames); |
138 } | 138 } |
139 } | 139 } |
140 } | 140 } |
141 | 141 |
142 </script> | 142 </script> |
143 </head> | 143 </head> |
144 | 144 |
145 <body onload="runTest()"> | 145 <body onload="runTest()"> |
146 <p> | 146 <p> |
147 Tests setting breakpoints. | 147 Tests setting breakpoints. |
148 </p> | 148 </p> |
149 | 149 |
150 </body> | 150 </body> |
151 </html> | 151 </html> |
OLD | NEW |