| OLD | NEW |
| 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="../../isolated-filesystem-test.js"></script> | 4 <script src="../../isolated-filesystem-test.js"></script> |
| 5 <script src="../../workspace-test.js"></script> | 5 <script src="../../workspace-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 function loadCSS() | 7 function loadCSS() |
| 8 { | 8 { |
| 9 var link = document.createElement("link"); | 9 var link = document.createElement("link"); |
| 10 link.rel = "stylesheet"; | 10 link.rel = "stylesheet"; |
| 11 link.type = "text/css"; | 11 link.type = "text/css"; |
| 12 link.href = "resources/update-locations-on-filesystem-scss-load.css"; | 12 link.href = "resources/update-locations-on-filesystem-scss-load.css"; |
| 13 document.head.appendChild(link); | 13 document.head.appendChild(link); |
| 14 } | 14 } |
| 15 | 15 |
| 16 function test() | 16 function test() |
| 17 { | 17 { |
| 18 InspectorTest.addResult("Creating filesystem with the SCSS file..."); | 18 InspectorTest.addResult("Creating filesystem with the SCSS file..."); |
| 19 var fs = new InspectorTest.TestFileSystem("file:///var/www"); | 19 var fs = new InspectorTest.TestFileSystem("file:///var/www"); |
| 20 fs.root.addFile("update-locations-on-filesystem-scss-load.scss", ["a {", "
foo: bar;", "/* COMMENT */", " font-size: 12px;", "}"].join("\n")); | 20 fs.root.addFile("update-locations-on-filesystem-scss-load.scss", ["a {", "
foo: bar;", "/* COMMENT */", " font-size: 12px;", "}"].join("\n")); |
| 21 fs.addFileMapping(WebInspector.ParsedURL.completeURL(InspectorTest.resourceT
reeModel.inspectedPageURL(), "resources/source/"), "/"); | 21 fs.addFileMapping(WebInspector.ParsedURL.completeURL(InspectorTest.mainTarge
t.inspectedURL(), "resources/source/"), "/"); |
| 22 fs.reportCreated(fileSystemCreated); | 22 fs.reportCreated(fileSystemCreated); |
| 23 | 23 |
| 24 function fileSystemCreated() | 24 function fileSystemCreated() |
| 25 { | 25 { |
| 26 InspectorTest.addResult("Loading raw css with mapping..."); | 26 InspectorTest.addResult("Loading raw css with mapping..."); |
| 27 InspectorTest.cssModel.addEventListener(WebInspector.CSSModel.Events.Sty
leSheetAdded, styleSheetAdded); | 27 InspectorTest.cssModel.addEventListener(WebInspector.CSSModel.Events.Sty
leSheetAdded, styleSheetAdded); |
| 28 InspectorTest.evaluateInPage("loadCSS()"); | 28 InspectorTest.evaluateInPage("loadCSS()"); |
| 29 } | 29 } |
| 30 | 30 |
| 31 var liveLocation; | 31 var liveLocation; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 57 var networkURL = WebInspector.networkMapping.networkURL(uiLocation.uiSou
rceCode); | 57 var networkURL = WebInspector.networkMapping.networkURL(uiLocation.uiSou
rceCode); |
| 58 InspectorTest.addResult(networkURL + ":" + uiLocation.lineNumber + ":" +
uiLocation.columnNumber); | 58 InspectorTest.addResult(networkURL + ":" + uiLocation.lineNumber + ":" +
uiLocation.columnNumber); |
| 59 } | 59 } |
| 60 }; | 60 }; |
| 61 </script> | 61 </script> |
| 62 </head> | 62 </head> |
| 63 <body onload="runTest()"> | 63 <body onload="runTest()"> |
| 64 <p>Tests that stylesheet LiveLocations are updated when an SCSS file is loaded f
rom the filesystem.</p> | 64 <p>Tests that stylesheet LiveLocations are updated when an SCSS file is loaded f
rom the filesystem.</p> |
| 65 </body> | 65 </body> |
| 66 </html> | 66 </html> |
| OLD | NEW |