| Index: LayoutTests/http/tests/inspector/stylesheet-source-mapping.html
|
| diff --git a/LayoutTests/http/tests/inspector/stylesheet-source-mapping.html b/LayoutTests/http/tests/inspector/stylesheet-source-mapping.html
|
| index 950704547d570b7fe07abef6e9f1b37664c18b17..e3b657e73e02acbeef8e6fa055112d6be6026bbf 100644
|
| --- a/LayoutTests/http/tests/inspector/stylesheet-source-mapping.html
|
| +++ b/LayoutTests/http/tests/inspector/stylesheet-source-mapping.html
|
| @@ -18,6 +18,7 @@ function test()
|
| InspectorTest.waitForWorkspaceUISourceCodeAddedEvent(cssUISourceCodeAdded);
|
| const styleSheetURL = "http://localhost:8000/inspector/resources/example.css";
|
| const sourceMapURL = "example.css.map";
|
| + const styleSheetId = 1;
|
| InspectorTest.addMockUISourceCodeToWorkspace(styleSheetURL, WebInspector.resourceTypes.Stylesheet, "");
|
|
|
| InspectorTest.addSniffer(WebInspector.CSSStyleSheetHeader.prototype, "updateLocations", locationsUpdated, true);
|
| @@ -25,7 +26,7 @@ function test()
|
|
|
| function locationsUpdated()
|
| {
|
| - var uiLocation = new WebInspector.CSSLocation(WebInspector.targetManager.mainTarget(), "http://localhost:8000/inspector/resources/example.css", 2, 3).toUILocation();
|
| + var uiLocation = new WebInspector.CSSLocation(WebInspector.targetManager.mainTarget(), styleSheetId, styleSheetURL, 2, 3).toUILocation();
|
| if (uiLocation.uiSourceCode.url.indexOf(".scss") === -1)
|
| return;
|
| finalMappedLocation = uiLocation.uiSourceCode.url + ":" + uiLocation.lineNumber + ":" + uiLocation.columnNumber;
|
| @@ -37,7 +38,7 @@ function test()
|
| {
|
| const frame = WebInspector.resourceTreeModel.mainFrame;
|
| return {
|
| - styleSheetId: "1000",
|
| + styleSheetId: styleSheetId,
|
| frameId: frame.id,
|
| sourceURL: url,
|
| sourceMapURL: sourceMapURL,
|
| @@ -72,12 +73,12 @@ function test()
|
|
|
| function rawLocationToUILocation(line, column)
|
| {
|
| - return new WebInspector.CSSLocation(WebInspector.targetManager.mainTarget(), "http://localhost:8000/inspector/resources/example.css", line, column).toUILocation();
|
| + return new WebInspector.CSSLocation(WebInspector.targetManager.mainTarget(), styleSheetId, styleSheetURL, line, column).toUILocation();
|
| }
|
|
|
| function afterStyleSheetAdded()
|
| {
|
| - var cssUISourceCode = InspectorTest.testWorkspace.uiSourceCodeForOriginURL("http://localhost:8000/inspector/resources/example.css");
|
| + var cssUISourceCode = InspectorTest.testWorkspace.uiSourceCodeForOriginURL(styleSheetURL);
|
| var scssUISourceCode = InspectorTest.testWorkspace.uiSourceCodeForOriginURL("http://localhost:8000/inspector/resources/example.scss");
|
|
|
| InspectorTest.checkUILocation(cssUISourceCode, 0, 3, rawLocationToUILocation(0, 3));
|
|
|