Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Unified Diff: LayoutTests/inspector/sources/debugger/multi-target-breakpoint-manager.html

Issue 299443016: DevTools: Decouple debugger model from UI entities (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge DebuggerScriptMapping into DebuggerWorkspaceBinding Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
index d3d4863f501133958c5ba6c62c9914623b246d30..4c45a42b898f549f293508f6ca31b158b9ec59b2 100644
--- a/LayoutTests/inspector/sources/debugger/multi-target-breakpoint-manager.html
+++ b/LayoutTests/inspector/sources/debugger/multi-target-breakpoint-manager.html
@@ -1,10 +1,12 @@
<html>
<head>
<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/workspace-test.js"></script>
<script src="breakpoint-manager.js"></script>
<script>
+
function test()
{
InspectorTest.dumpTargetIds = true;
@@ -15,22 +17,21 @@ function test()
function testResolvedBreakpointInBothTarget(next)
{
- var targetManager = new WebInspector.TargetManager();
- var target1 = InspectorTest.createMockTarget(targetManager, 1);
- targetManager._targets.push(target1);
- var breakpointManager = InspectorTest.createBreakpointManager(targetManager);
+ InspectorTest.createWorkspace(true);
+ var breakpointManager = InspectorTest.createBreakpointManager(InspectorTest.testTargetManager, InspectorTest.testDebuggerWorkspaceBinding);
+ var target1 = InspectorTest.createMockTarget(1);
+ InspectorTest.testTargetManager.addTarget(target1);
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));
+ target1.debuggerModel._breakpointResolved("a.js:30", new WebInspector.DebuggerModel.Location(target1, "a.js", 131, 0));
InspectorTest.dumpBreakpointLocations(breakpointManager);
InspectorTest.addResult(" Second target added");
- target2 = InspectorTest.createMockTarget(targetManager, 2);
- new InspectorTest.DebuggerModelMock(target2, target2.defaultMapping);
- targetManager.addTarget(target2);
+ target2 = InspectorTest.createMockTarget(2);
+ InspectorTest.testTargetManager.addTarget(target2);
target2.debuggerModel._addScript("a.js", "a.js");
uiSourceCode.setSourceMappingForTarget(target2, target2.defaultMapping);
window.setBreakpointCallback = step2;
@@ -38,27 +39,29 @@ function test()
function step2()
{
- target2.debuggerModel._breakpointResolved("a.js:30", new WebInspector.DebuggerModel.Location(target2, "a.js", 30, 5));
+ target2.debuggerModel._breakpointResolved("a.js:30", new WebInspector.DebuggerModel.Location(target2, "a.js", 30, 0));
InspectorTest.dumpBreakpointLocations(breakpointManager);
- InspectorTest.addResult(" First target removed")
- targetManager.removeTarget(target1);
+ InspectorTest.addResult(" First target removed");
+ target1.detached = true;
+ InspectorTest.testTargetManager.removeTarget(target1);
InspectorTest.dumpBreakpointLocations(breakpointManager);
- InspectorTest.addResult(" Second target removed")
- targetManager.removeTarget(target2);
- InspectorTest.finishBreakpointTest(breakpointManager, next)
+ InspectorTest.addResult(" Second target removed");
+ target2.detached = true;
vsevik 2014/08/04 09:05:15 Move into testTargetManager.removeTarget() ?
apavlov 2014/08/04 10:04:34 This is a method on TargetManager, so extracted in
+ InspectorTest.testTargetManager.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);
+ InspectorTest.createWorkspace(true);
+ var target1 = InspectorTest.createMockTarget(1);
+ var target2 = InspectorTest.createMockTarget(2);
- targetManager._targets.push(target1);
- targetManager._targets.push(target2);
- var breakpointManager = InspectorTest.createBreakpointManager(targetManager);
+ InspectorTest.testTargetManager.addTarget(target1);
+ InspectorTest.testTargetManager.addTarget(target2);
+ var breakpointManager = InspectorTest.createBreakpointManager(InspectorTest.testTargetManager, InspectorTest.testDebuggerWorkspaceBinding);
var uiSourceCode = InspectorTest.addUISourceCode(target1, breakpointManager, "a.js");
InspectorTest.setBreakpoint(breakpointManager, uiSourceCode, 30, 0, "", true, step1);
@@ -70,7 +73,8 @@ function test()
function step2()
{
InspectorTest.addResult(" First target removed!")
- targetManager.removeTarget(target1);
+ target1.detached = true;
+ InspectorTest.testTargetManager.removeTarget(target1);
InspectorTest.dumpBreakpointLocations(breakpointManager);
InspectorTest.finishBreakpointTest(breakpointManager, next);
}
@@ -78,7 +82,6 @@ function test()
]);
};
-
</script>
</head>

Powered by Google App Engine
This is Rietveld 408576698