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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/bindings/NetworkProject.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 /** 57 /**
58 * @param {!Common.Event} event 58 * @param {!Common.Event} event
59 */ 59 */
60 _sourceMapAttached(event) { 60 _sourceMapAttached(event) {
61 var header = /** @type {!SDK.CSSStyleSheetHeader} */ (event.data); 61 var header = /** @type {!SDK.CSSStyleSheetHeader} */ (event.data);
62 var sourceMap = this._cssModel.sourceMapForHeader(header); 62 var sourceMap = this._cssModel.sourceMapForHeader(header);
63 for (var sassURL of sourceMap.sourceURLs()) { 63 for (var sassURL of sourceMap.sourceURLs()) {
64 var contentProvider = sourceMap.sourceContentProvider(sassURL, Common.reso urceTypes.SourceMapStyleSheet); 64 var contentProvider = sourceMap.sourceContentProvider(sassURL, Common.reso urceTypes.SourceMapStyleSheet);
65 var embeddedContent = sourceMap.embeddedContentByURL(sassURL); 65 var embeddedContent = sourceMap.embeddedContentByURL(sassURL);
66 var embeddedContentLength = typeof embeddedContent === 'string' ? embedded Content.length : null; 66 var embeddedContentLength = typeof embeddedContent === 'string' ? embedded Content.length : null;
67 this._networkProject.addFile( 67 this._networkProject.addSourceMapFile(
68 contentProvider, SDK.ResourceTreeFrame.fromStyleSheet(header), false, embeddedContentLength); 68 contentProvider, SDK.ResourceTreeFrame.fromStyleSheet(header), false, embeddedContentLength);
69 } 69 }
70 Bindings.cssWorkspaceBinding.updateLocations(header); 70 Bindings.cssWorkspaceBinding.updateLocations(header);
71 this._sourceMapAttachedForTest(sourceMap); 71 this._sourceMapAttachedForTest(sourceMap);
72 } 72 }
73 73
74 /** 74 /**
75 * @param {!Common.Event} event 75 * @param {!Common.Event} event
76 */ 76 */
77 _sourceMapDetached(event) { 77 _sourceMapDetached(event) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForStyleURL(this._wor kspace, entry.sourceURL, header); 121 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForStyleURL(this._wor kspace, entry.sourceURL, header);
122 if (!uiSourceCode) 122 if (!uiSourceCode)
123 return null; 123 return null;
124 return uiSourceCode.uiLocation(entry.sourceLineNumber || 0, entry.sourceColu mnNumber); 124 return uiSourceCode.uiLocation(entry.sourceLineNumber || 0, entry.sourceColu mnNumber);
125 } 125 }
126 126
127 dispose() { 127 dispose() {
128 Common.EventTarget.removeEventListeners(this._eventListeners); 128 Common.EventTarget.removeEventListeners(this._eventListeners);
129 } 129 }
130 }; 130 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/bindings/NetworkProject.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698