| 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="breakpoint-manager.js"></script> | 4 <script src="breakpoint-manager.js"></script> |
| 5 | 5 |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 function resetWorkspace(breakpointManager) | 10 function resetWorkspace(breakpointManager) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 function createBreakpoint(uiSourceCodeId, lineNumber, condition, enabled) | 29 function createBreakpoint(uiSourceCodeId, lineNumber, condition, enabled) |
| 30 { | 30 { |
| 31 return { sourceFileId: uiSourceCodeId, lineNumber: lineNumber, condition
: condition, enabled: enabled }; | 31 return { sourceFileId: uiSourceCodeId, lineNumber: lineNumber, condition
: condition, enabled: enabled }; |
| 32 } | 32 } |
| 33 | 33 |
| 34 var serializedBreakpoints = []; | 34 var serializedBreakpoints = []; |
| 35 serializedBreakpoints.push(createBreakpoint("a.js", 10, "foo == bar", true))
; | 35 serializedBreakpoints.push(createBreakpoint("a.js", 10, "foo == bar", true))
; |
| 36 serializedBreakpoints.push(createBreakpoint("a.js", 20, "", false)); | 36 serializedBreakpoints.push(createBreakpoint("a.js", 20, "", false)); |
| 37 serializedBreakpoints.push(createBreakpoint("b.js", 3, "", true)); | 37 serializedBreakpoints.push(createBreakpoint("b.js", 3, "", true)); |
| 38 | 38 |
| 39 var mockTarget = { | |
| 40 | |
| 41 id: function() | |
| 42 { | |
| 43 return 1; | |
| 44 } | |
| 45 }; | |
| 46 var targetManager = new WebInspector.TargetManager(); | 39 var targetManager = new WebInspector.TargetManager(); |
| 40 var mockTarget = InspectorTest.createMockTarget(targetManager, 1); |
| 47 targetManager._targets.push(mockTarget); | 41 targetManager._targets.push(mockTarget); |
| 48 | |
| 49 InspectorTest.setupLiveLocationSniffers(); | 42 InspectorTest.setupLiveLocationSniffers(); |
| 50 InspectorTest.initializeDefaultMappingOnTarget(mockTarget); | |
| 51 | 43 |
| 52 var addUISourceCode = InspectorTest.addUISourceCode.bind(null, mockTarget); | 44 var addUISourceCode = InspectorTest.addUISourceCode.bind(null, mockTarget); |
| 53 var createBreakpointManager = InspectorTest.createBreakpointManager.bind(nul
l, targetManager); | 45 var createBreakpointManager = InspectorTest.createBreakpointManager.bind(nul
l, targetManager); |
| 54 | 46 |
| 55 InspectorTest.runTestSuite([ | 47 InspectorTest.runTestSuite([ |
| 56 function testSetBreakpoint(next) | 48 function testSetBreakpoint(next) |
| 57 { | 49 { |
| 58 var breakpointManager = createBreakpointManager(); | 50 var breakpointManager = createBreakpointManager(); |
| 59 var uiSourceCode = addUISourceCode(breakpointManager, "a.js"); | 51 var uiSourceCode = addUISourceCode(breakpointManager, "a.js"); |
| 60 InspectorTest.setBreakpoint(breakpointManager, uiSourceCode, 30, 0,
"", true, InspectorTest.finishBreakpointTest.bind(this, breakpointManager, next)
); | 52 InspectorTest.setBreakpoint(breakpointManager, uiSourceCode, 30, 0,
"", true, InspectorTest.finishBreakpointTest.bind(this, breakpointManager, next)
); |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 | 347 |
| 356 </script> | 348 </script> |
| 357 | 349 |
| 358 </head> | 350 </head> |
| 359 | 351 |
| 360 <body onload="runTest()"> | 352 <body onload="runTest()"> |
| 361 <p>Tests BreakpointManager class.</p> | 353 <p>Tests BreakpointManager class.</p> |
| 362 | 354 |
| 363 </body> | 355 </body> |
| 364 </html> | 356 </html> |
| OLD | NEW |