| Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js
|
| diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js
|
| index b0006e5bdce566a52200cbc14ef2e847d5a60c63..418381735b3263cd73bd1c78c42ae560ca5d4494 100644
|
| --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js
|
| +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js
|
| @@ -11,7 +11,8 @@ InspectorTest.createWorkspace = function()
|
| InspectorTest.createMockTarget = function(id)
|
| {
|
| var capabilities = SDK.Target.Capability.AllForTests;
|
| - var target = InspectorTest.testTargetManager.createTarget("mock-target-id-" + id, "mock-target-" + id, capabilities & (~SDK.Target.Capability.JS), (params) => new SDK.StubConnection(params), null);
|
| + var dispatcher = new Protocol.Dispatcher((params) => new SDK.StubConnection(params));
|
| + var target = InspectorTest.testTargetManager.createTarget("mock-target-id-" + id, "mock-target-" + id, capabilities & (~SDK.Target.Capability.JS), dispatcher, null);
|
| InspectorTest.testNetworkProject = Bindings.NetworkProject.forTarget(target);
|
| target._capabilitiesMask = capabilities;
|
| target._inspectedURL = InspectorTest.mainTarget.inspectedURL();
|
| @@ -19,7 +20,7 @@ InspectorTest.createMockTarget = function(id)
|
| target.resourceTreeModel._cachedResourcesProcessed = true;
|
| target.resourceTreeModel._frameAttached("42", 0);
|
| target.runtimeModel = /** @type {!SDK.RuntimeModel} */ (target.model(SDK.RuntimeModel));
|
| - target.debuggerModel = new InspectorTest.DebuggerModelMock(target);
|
| + target.debuggerModel = new InspectorTest.DebuggerModelMock(target, target._dispatcher);
|
| target._modelByConstructor.set(SDK.DebuggerModel, target.debuggerModel);
|
| InspectorTest.testTargetManager.modelAdded(target, SDK.DebuggerModel, target.debuggerModel);
|
| return target;
|
| @@ -55,11 +56,12 @@ InspectorTest.DebuggerModelMock = class extends SDK.SDKModel {
|
| return this._sourceMapManager;
|
| }
|
|
|
| - constructor(target)
|
| + constructor(target, dispatcher)
|
| {
|
| - super(target);
|
| + super(target, dispatcher);
|
| this._sourceMapManager = new SDK.SourceMapManager();
|
| this._target = target;
|
| + this._agent = dispatcher.debuggerAgent();
|
| this._breakpointResolvedEventTarget = new Common.Object();
|
| this._scripts = {};
|
| this._breakpoints = {};
|
| @@ -91,7 +93,7 @@ InspectorTest.DebuggerModelMock = class extends SDK.SDKModel {
|
|
|
| _addScript(scriptId, url)
|
| {
|
| - var script = new SDK.Script(this, scriptId, url);
|
| + var script = new SDK.Script(this, this._agent, scriptId, url);
|
| this._scripts[scriptId] = script;
|
| this._debuggerWorkspaceBinding._debuggerModelToData.get(this)._parsedScriptSource({data: script});
|
| }
|
| @@ -245,7 +247,7 @@ InspectorTest.addUISourceCode = function(target, breakpointManager, url, doNotSe
|
| var uiSourceCode = InspectorTest.testWorkspace.uiSourceCodeForURL(url);
|
| if (uiSourceCode)
|
| uiSourceCode.project().removeFile(url);
|
| - var resource = new SDK.Resource(target, null, url, url, '', '', Common.resourceTypes.Document, 'text/html', null, null);
|
| + var resource = new SDK.Resource(target.model(SDK.ResourceTreeModel), target._dispatcher.pageAgent(), null, url, url, '', '', Common.resourceTypes.Document, 'text/html', null, null);
|
| InspectorTest.testNetworkProject._addResource(resource);
|
| uiSourceCode = InspectorTest.testWorkspace.uiSourceCodeForURL(url);
|
|
|
|
|