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

Side by Side Diff: LayoutTests/http/tests/inspector/stylesheet-source-mapping.html

Issue 297923002: DevTools: Decouple CSS model from UI entities (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove unused argument in test Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="inspector-test.js"></script> 3 <script src="inspector-test.js"></script>
4 <script src="debugger-test.js"></script> 4 <script src="debugger-test.js"></script>
5 <script src="workspace-test.js"></script> 5 <script src="workspace-test.js"></script>
6 6
7 <script> 7 <script>
8 8
9 function test() 9 function test()
10 { 10 {
11 var contentReceived; 11 var contentReceived;
12 var finalMappedLocation; 12 var finalMappedLocation;
13 InspectorTest.createWorkspace(); 13 InspectorTest.createWorkspace();
14 var target = WebInspector.targetManager.mainTarget(); 14 var target = WebInspector.targetManager.mainTarget();
15 var cssModel = new WebInspector.CSSStyleModel(target, InspectorTest.testWork space); 15 var cssModel = new WebInspector.CSSStyleModel(target);
16 target.cssModel = cssModel; 16 target.cssModel = cssModel;
17 var mapping = new WebInspector.CSSStyleSheetMapping(cssModel, InspectorTest. testWorkspace, InspectorTest.testNetworkWorkspaceBinding); 17 new WebInspector.CSSWorkspaceBinding.TargetInfo(target, InspectorTest.testWo rkspace, InspectorTest.testNetworkWorkspaceBinding);
18 18
19 InspectorTest.waitForWorkspaceUISourceCodeAddedEvent(cssUISourceCodeAdded); 19 InspectorTest.waitForWorkspaceUISourceCodeAddedEvent(cssUISourceCodeAdded);
20 const styleSheetURL = "http://localhost:8000/inspector/resources/example.css "; 20 const styleSheetURL = "http://localhost:8000/inspector/resources/example.css ";
21 const sourceMapURL = "example.css.map"; 21 const sourceMapURL = "example.css.map";
22 const styleSheetId = 1; 22 const styleSheetId = 1;
23 InspectorTest.addMockUISourceCodeToWorkspace(styleSheetURL, WebInspector.res ourceTypes.Stylesheet, ""); 23 InspectorTest.addMockUISourceCodeToWorkspace(styleSheetURL, WebInspector.res ourceTypes.Stylesheet, "");
24 24
25 InspectorTest.addSniffer(WebInspector.CSSStyleSheetHeader.prototype, "update Locations", locationsUpdated, true); 25 InspectorTest.addSniffer(WebInspector.CSSWorkspaceBinding.prototype, "update Locations", locationsUpdated, true);
26 cssModel._styleSheetAdded(createMockStyleSheetHeader(styleSheetURL, sourceMa pURL)); 26 cssModel._styleSheetAdded(createMockStyleSheetHeader(styleSheetURL, sourceMa pURL));
27 27
28 function locationsUpdated() 28 function locationsUpdated()
29 { 29 {
30 var uiLocation = WebInspector.cssWorkspaceBinding.rawLocationToUILocatio n(new WebInspector.CSSLocation(target, styleSheetId, styleSheetURL, 2, 3)); 30 var uiLocation = WebInspector.cssWorkspaceBinding.rawLocationToUILocatio n(new WebInspector.CSSLocation(target, styleSheetId, styleSheetURL, 2, 3));
31 if (uiLocation.uiSourceCode.url.indexOf(".scss") === -1) 31 if (uiLocation.uiSourceCode.url.indexOf(".scss") === -1)
32 return; 32 return;
33 finalMappedLocation = uiLocation.uiSourceCode.url + ":" + uiLocation.lin eNumber + ":" + uiLocation.columnNumber; 33 finalMappedLocation = uiLocation.uiSourceCode.url + ":" + uiLocation.lin eNumber + ":" + uiLocation.columnNumber;
34 join(); 34 join();
35 } 35 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 </script> 115 </script>
116 116
117 </head> 117 </head>
118 118
119 <body onload="runTest()"> 119 <body onload="runTest()">
120 <p>Tests SourceMap and StyleSheetMapping.</p> 120 <p>Tests SourceMap and StyleSheetMapping.</p>
121 </body> 121 </body>
122 </html> 122 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698