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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.js

Issue 2747863007: DevTools: clean up tests to not depend on NetworkProject.addFile method (Closed)
Patch Set: typo Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 var initialize_BreakpointManagerTest = function() { 1 var initialize_BreakpointManagerTest = function() {
2 2
3 InspectorTest.createWorkspace = function() 3 InspectorTest.createWorkspace = function()
4 { 4 {
5 InspectorTest.testTargetManager = new SDK.TargetManager(); 5 InspectorTest.testTargetManager = new SDK.TargetManager();
6 InspectorTest.testWorkspace = new Workspace.Workspace(); 6 InspectorTest.testWorkspace = new Workspace.Workspace();
7 InspectorTest.testNetworkProjectManager = new Bindings.NetworkProjectManager (InspectorTest.testTargetManager, InspectorTest.testWorkspace); 7 InspectorTest.testNetworkProjectManager = new Bindings.NetworkProjectManager (InspectorTest.testTargetManager, InspectorTest.testWorkspace);
8 InspectorTest.testDebuggerWorkspaceBinding = new Bindings.DebuggerWorkspaceB inding(InspectorTest.testTargetManager, InspectorTest.testWorkspace); 8 InspectorTest.testDebuggerWorkspaceBinding = new Bindings.DebuggerWorkspaceB inding(InspectorTest.testTargetManager, InspectorTest.testWorkspace);
9 } 9 }
10 10
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 return uiSourceCode; 223 return uiSourceCode;
224 } 224 }
225 } 225 }
226 } 226 }
227 227
228 InspectorTest.addUISourceCode = function(target, breakpointManager, url, doNotSe tSourceMapping, doNotAddScript) 228 InspectorTest.addUISourceCode = function(target, breakpointManager, url, doNotSe tSourceMapping, doNotAddScript)
229 { 229 {
230 if (!doNotAddScript) 230 if (!doNotAddScript)
231 InspectorTest.addScript(target, breakpointManager, url); 231 InspectorTest.addScript(target, breakpointManager, url);
232 InspectorTest.addResult(" Adding UISourceCode: " + url); 232 InspectorTest.addResult(" Adding UISourceCode: " + url);
233 var contentProvider = Common.StaticContentProvider.fromString(url, Common.re sourceTypes.Script, ""); 233
234 var uiSourceCode = InspectorTest.testNetworkProject.addFile(contentProvider, null); 234 // Add resource to get UISourceCode.
235 var uiSourceCode = InspectorTest.testWorkspace.uiSourceCodeForURL(url);
236 if (uiSourceCode)
237 uiSourceCode.project().removeFile(url);
238 var resource = new SDK.Resource(target, null, url, url, '', '', Common.resou rceTypes.Document, 'text/html', null, null);
239 InspectorTest.testNetworkProject._addResource(resource);
240 uiSourceCode = InspectorTest.testWorkspace.uiSourceCodeForURL(url);
241
242 //var contentProvider = Common.StaticContentProvider.fromString(url, Common. resourceTypes.Script, "");
243 //var uiSourceCode = InspectorTest.testNetworkProject.addFile(contentProvide r, null);
235 InspectorTest.uiSourceCodes[url] = uiSourceCode; 244 InspectorTest.uiSourceCodes[url] = uiSourceCode;
236 if (!doNotSetSourceMapping) { 245 if (!doNotSetSourceMapping) {
237 breakpointManager._debuggerWorkspaceBinding.setSourceMapping(target.debu ggerModel, uiSourceCode, breakpointManager.defaultMapping); 246 breakpointManager._debuggerWorkspaceBinding.setSourceMapping(target.debu ggerModel, uiSourceCode, breakpointManager.defaultMapping);
238 breakpointManager._debuggerWorkspaceBinding.updateLocations(target.debug gerModel.scriptForId(url)); 247 breakpointManager._debuggerWorkspaceBinding.updateLocations(target.debug gerModel.scriptForId(url));
239 } 248 }
240 return uiSourceCode; 249 return uiSourceCode;
241 } 250 }
242 251
243 InspectorTest.createBreakpointManager = function(targetManager, debuggerWorkspac eBinding, persistentBreakpoints) 252 InspectorTest.createBreakpointManager = function(targetManager, debuggerWorkspac eBinding, persistentBreakpoints)
244 { 253 {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 } 400 }
392 401
393 function finish() 402 function finish()
394 { 403 {
395 InspectorTest.dumpBreakpointLocations(breakpointManager); 404 InspectorTest.dumpBreakpointLocations(breakpointManager);
396 next(); 405 next();
397 } 406 }
398 } 407 }
399 408
400 } 409 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698