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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 var missingSources = []; 241 var missingSources = [];
242 for (var sourceURL of sourceMap.sourceURLs()) { 242 for (var sourceURL of sourceMap.sourceURLs()) {
243 if (this._sourceMapForURL.get(sourceURL)) 243 if (this._sourceMapForURL.get(sourceURL))
244 continue; 244 continue;
245 this._sourceMapForURL.set(sourceURL, sourceMap); 245 this._sourceMapForURL.set(sourceURL, sourceMap);
246 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForScriptURL(this._ workspace, sourceURL, script); 246 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForScriptURL(this._ workspace, sourceURL, script);
247 if (!uiSourceCode) { 247 if (!uiSourceCode) {
248 var contentProvider = sourceMap.sourceContentProvider(sourceURL, Common. resourceTypes.SourceMapScript); 248 var contentProvider = sourceMap.sourceContentProvider(sourceURL, Common. resourceTypes.SourceMapScript);
249 var embeddedContent = sourceMap.embeddedContentByURL(sourceURL); 249 var embeddedContent = sourceMap.embeddedContentByURL(sourceURL);
250 var embeddedContentLength = typeof embeddedContent === 'string' ? embedd edContent.length : null; 250 var embeddedContentLength = typeof embeddedContent === 'string' ? embedd edContent.length : null;
251 uiSourceCode = this._networkProject.addFile( 251 uiSourceCode = this._networkProject.addSourceMapFile(
252 contentProvider, SDK.ResourceTreeFrame.fromScript(script), script.is ContentScript(), embeddedContentLength); 252 contentProvider, SDK.ResourceTreeFrame.fromScript(script), script.is ContentScript(), embeddedContentLength);
253 uiSourceCode[Bindings.CompilerScriptMapping._originSymbol] = script.sour ceURL; 253 uiSourceCode[Bindings.CompilerScriptMapping._originSymbol] = script.sour ceURL;
254 } 254 }
255 if (uiSourceCode) { 255 if (uiSourceCode) {
256 this._bindUISourceCode(uiSourceCode); 256 this._bindUISourceCode(uiSourceCode);
257 } else { 257 } else {
258 if (missingSources.length < 3) 258 if (missingSources.length < 3)
259 missingSources.push(sourceURL); 259 missingSources.push(sourceURL);
260 else if (missingSources.peekLast() !== '\u2026') 260 else if (missingSources.peekLast() !== '\u2026')
261 missingSources.push('\u2026'); 261 missingSources.push('\u2026');
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 380 }
381 381
382 dispose() { 382 dispose() {
383 Common.EventTarget.removeEventListeners(this._eventListeners); 383 Common.EventTarget.removeEventListeners(this._eventListeners);
384 this._debuggerReset(); 384 this._debuggerReset();
385 this._stubProject.dispose(); 385 this._stubProject.dispose();
386 } 386 }
387 }; 387 };
388 388
389 Bindings.CompilerScriptMapping._originSymbol = Symbol('origin'); 389 Bindings.CompilerScriptMapping._originSymbol = Symbol('origin');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698