| 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/workspace-test.js"></script> | 4 <script src="../../../http/tests/inspector/workspace-test.js"></script> |
| 5 <script src="breakpoint-manager.js"></script> | 5 <script src="breakpoint-manager.js"></script> |
| 6 | 6 |
| 7 <script> | 7 <script> |
| 8 | 8 |
| 9 function test() | 9 function test() |
| 10 { | 10 { |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 var serializedBreakpoints = [createBreakpoint("b.js", 20, "foo == ba
r", true)]; | 285 var serializedBreakpoints = [createBreakpoint("b.js", 20, "foo == ba
r", true)]; |
| 286 createWorkspace(); | 286 createWorkspace(); |
| 287 var breakpointManager = createBreakpointManager(serializedBreakpoint
s); | 287 var breakpointManager = createBreakpointManager(serializedBreakpoint
s); |
| 288 InspectorTest.addResult("\n Adding files:"); | 288 InspectorTest.addResult("\n Adding files:"); |
| 289 var uiSourceCodeA = addUISourceCode(breakpointManager, "a.js"); | 289 var uiSourceCodeA = addUISourceCode(breakpointManager, "a.js"); |
| 290 var uiSourceCodeB = addUISourceCode(breakpointManager, "b.js", true,
true); | 290 var uiSourceCodeB = addUISourceCode(breakpointManager, "b.js", true,
true); |
| 291 | 291 |
| 292 InspectorTest.addResult("\n Toggling source mapping."); | 292 InspectorTest.addResult("\n Toggling source mapping."); |
| 293 var sourceMapping = createSourceMapping(uiSourceCodeA, uiSourceCodeB
); | 293 var sourceMapping = createSourceMapping(uiSourceCodeA, uiSourceCodeB
); |
| 294 mockTarget.debuggerModel.pushSourceMapping(sourceMapping); | 294 mockTarget.debuggerModel.pushSourceMapping(sourceMapping); |
| 295 uiSourceCodeB.setSourceMappingForTarget(mockTarget, sourceMapping); | 295 breakpointManager._debuggerWorkspaceBinding.setSourceMapping(mockTar
get, uiSourceCodeB, sourceMapping); |
| 296 InspectorTest.runAfterPendingBreakpointUpdates(breakpointManager, br
eakpointActionsPerformedBeforeReload.bind(this)); | 296 InspectorTest.runAfterPendingBreakpointUpdates(breakpointManager, br
eakpointActionsPerformedBeforeReload.bind(this)); |
| 297 | 297 |
| 298 function breakpointActionsPerformedBeforeReload() | 298 function breakpointActionsPerformedBeforeReload() |
| 299 { | 299 { |
| 300 InspectorTest.dumpBreakpointLocations(breakpointManager); | 300 InspectorTest.dumpBreakpointLocations(breakpointManager); |
| 301 InspectorTest.addResult("\n Reloading:"); | 301 InspectorTest.addResult("\n Reloading:"); |
| 302 resetWorkspace(breakpointManager); | 302 resetWorkspace(breakpointManager); |
| 303 | 303 |
| 304 InspectorTest.addResult("\n Adding files:"); | 304 InspectorTest.addResult("\n Adding files:"); |
| 305 InspectorTest.addScript(mockTarget, breakpointManager, "a.js"); | 305 InspectorTest.addScript(mockTarget, breakpointManager, "a.js"); |
| 306 mockTarget.debuggerModel._breakpointResolved("a.js:10", new WebI
nspector.DebuggerModel.Location(mockTarget, "a.js", 10, 0)); | 306 mockTarget.debuggerModel._breakpointResolved("a.js:10", new WebI
nspector.DebuggerModel.Location(mockTarget, "a.js", 10, 0)); |
| 307 uiSourceCodeA = addUISourceCode(breakpointManager, "a.js", false
, true); | 307 uiSourceCodeA = addUISourceCode(breakpointManager, "a.js", false
, true); |
| 308 uiSourceCodeB = addUISourceCode(breakpointManager, "b.js", true,
true); | 308 uiSourceCodeB = addUISourceCode(breakpointManager, "b.js", true,
true); |
| 309 | 309 |
| 310 InspectorTest.addResult("\n Toggling source mapping."); | 310 InspectorTest.addResult("\n Toggling source mapping."); |
| 311 var sourceMapping = createSourceMapping(uiSourceCodeA, uiSourceC
odeB); | 311 var sourceMapping = createSourceMapping(uiSourceCodeA, uiSourceC
odeB); |
| 312 mockTarget.debuggerModel.pushSourceMapping(sourceMapping); | 312 mockTarget.debuggerModel.pushSourceMapping(sourceMapping); |
| 313 uiSourceCodeB.setSourceMappingForTarget(mockTarget, sourceMappin
g); | 313 breakpointManager._debuggerWorkspaceBinding.setSourceMapping(moc
kTarget, uiSourceCodeB, sourceMapping); |
| 314 InspectorTest.runAfterPendingBreakpointUpdates(breakpointManager
, breakpointActionsPerformed.bind(this)); | 314 InspectorTest.runAfterPendingBreakpointUpdates(breakpointManager
, breakpointActionsPerformed.bind(this)); |
| 315 } | 315 } |
| 316 | 316 |
| 317 function breakpointActionsPerformed() | 317 function breakpointActionsPerformed() |
| 318 { | 318 { |
| 319 InspectorTest.finishBreakpointTest(breakpointManager, next); | 319 InspectorTest.finishBreakpointTest(breakpointManager, next); |
| 320 } | 320 } |
| 321 }, | 321 }, |
| 322 | 322 |
| 323 function testBreakpointInCollectedReload(next) | 323 function testBreakpointInCollectedReload(next) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 346 InspectorTest.runAfterPendingBreakpointUpdates(breakpointManager
, breakpointActionsPerformed.bind(this)); | 346 InspectorTest.runAfterPendingBreakpointUpdates(breakpointManager
, breakpointActionsPerformed.bind(this)); |
| 347 | 347 |
| 348 function breakpointActionsPerformed() | 348 function breakpointActionsPerformed() |
| 349 { | 349 { |
| 350 InspectorTest.finishBreakpointTest(breakpointManager, next); | 350 InspectorTest.finishBreakpointTest(breakpointManager, next); |
| 351 } | 351 } |
| 352 } | 352 } |
| 353 }, | 353 }, |
| 354 ]); | 354 ]); |
| 355 }; | 355 }; |
| 356 | |
| 357 </script> | 356 </script> |
| 358 | 357 |
| 359 </head> | 358 </head> |
| 360 | 359 |
| 361 <body onload="runTest()"> | 360 <body onload="runTest()"> |
| 362 <p>Tests BreakpointManager class.</p> | 361 <p>Tests BreakpointManager class.</p> |
| 363 | 362 |
| 364 </body> | 363 </body> |
| 365 </html> | 364 </html> |
| OLD | NEW |