| Index: LayoutTests/inspector/sources/debugger/multi-target-breakpoint-manager.html
|
| diff --git a/LayoutTests/inspector/sources/debugger/multi-target-breakpoint-manager.html b/LayoutTests/inspector/sources/debugger/multi-target-breakpoint-manager.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d3d4863f501133958c5ba6c62c9914623b246d30
|
| --- /dev/null
|
| +++ b/LayoutTests/inspector/sources/debugger/multi-target-breakpoint-manager.html
|
| @@ -0,0 +1,90 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="breakpoint-manager.js"></script>
|
| +
|
| +<script>
|
| +
|
| +function test()
|
| +{
|
| + InspectorTest.dumpTargetIds = true;
|
| + InspectorTest.setupLiveLocationSniffers();
|
| +
|
| +
|
| + InspectorTest.runTestSuite([
|
| +
|
| + function testResolvedBreakpointInBothTarget(next)
|
| + {
|
| + var targetManager = new WebInspector.TargetManager();
|
| + var target1 = InspectorTest.createMockTarget(targetManager, 1);
|
| + targetManager._targets.push(target1);
|
| + var breakpointManager = InspectorTest.createBreakpointManager(targetManager);
|
| + var uiSourceCode = InspectorTest.addUISourceCode(target1, breakpointManager, "a.js");
|
| + var target2;
|
| + InspectorTest.setBreakpoint(breakpointManager, uiSourceCode, 30, 0, "", true, step1);
|
| +
|
| + function step1()
|
| + {
|
| + target1.debuggerModel._breakpointResolved("a.js:30", new WebInspector.DebuggerModel.Location(target1, "a.js", 131, 5));
|
| + InspectorTest.dumpBreakpointLocations(breakpointManager);
|
| + InspectorTest.addResult(" Second target added");
|
| + target2 = InspectorTest.createMockTarget(targetManager, 2);
|
| + new InspectorTest.DebuggerModelMock(target2, target2.defaultMapping);
|
| + targetManager.addTarget(target2);
|
| + target2.debuggerModel._addScript("a.js", "a.js");
|
| + uiSourceCode.setSourceMappingForTarget(target2, target2.defaultMapping);
|
| + window.setBreakpointCallback = step2;
|
| + }
|
| +
|
| + function step2()
|
| + {
|
| + target2.debuggerModel._breakpointResolved("a.js:30", new WebInspector.DebuggerModel.Location(target2, "a.js", 30, 5));
|
| + InspectorTest.dumpBreakpointLocations(breakpointManager);
|
| + InspectorTest.addResult(" First target removed")
|
| + targetManager.removeTarget(target1);
|
| + InspectorTest.dumpBreakpointLocations(breakpointManager);
|
| + InspectorTest.addResult(" Second target removed")
|
| + targetManager.removeTarget(target2);
|
| + InspectorTest.finishBreakpointTest(breakpointManager, next)
|
| + }
|
| +
|
| + },
|
| +
|
| + function testResolvedBreakpointInOneTarget(next)
|
| + {
|
| + var targetManager = new WebInspector.TargetManager();
|
| + var target1 = InspectorTest.createMockTarget(targetManager, 1);
|
| + var target2 = InspectorTest.createMockTarget(targetManager, 2);
|
| +
|
| + targetManager._targets.push(target1);
|
| + targetManager._targets.push(target2);
|
| + var breakpointManager = InspectorTest.createBreakpointManager(targetManager);
|
| + var uiSourceCode = InspectorTest.addUISourceCode(target1, breakpointManager, "a.js");
|
| + InspectorTest.setBreakpoint(breakpointManager, uiSourceCode, 30, 0, "", true, step1);
|
| +
|
| + function step1()
|
| + {
|
| + window.setBreakpointCallback = step2;
|
| + }
|
| +
|
| + function step2()
|
| + {
|
| + InspectorTest.addResult(" First target removed!")
|
| + targetManager.removeTarget(target1);
|
| + InspectorTest.dumpBreakpointLocations(breakpointManager);
|
| + InspectorTest.finishBreakpointTest(breakpointManager, next);
|
| + }
|
| + },
|
| +
|
| + ]);
|
| +};
|
| +
|
| +</script>
|
| +
|
| +</head>
|
| +
|
| +<body onload="runTest()">
|
| +<p>Tests BreakpointManager class.</p>
|
| +
|
| +</body>
|
| +</html>
|
|
|