| <html> |
| <head> |
| |
| <link rel="stylesheet" href="resources/test-mapping-good.css?rel=123412341234"> |
| |
| <script src="../../http/tests/inspector/inspector-test.js"></script> |
| <script src="../../http/tests/inspector/debugger-test.js"></script> |
| <script src="./sass-test.js"></script> |
| <script> |
| |
| function simulateBrowserSync() |
| { |
| var link = document.querySelector("link"); |
| // Simulate iNotify push of new CSS. |
| link.href = "resources/test-mapping-good.css"; |
| // Simluate BrowserSync update styleSheet with a cache-busting URL. |
| setTimeout(() => link.href = "resources/test-mapping-good.css?rel=123412341234", 0); |
| } |
| |
| function test() |
| { |
| Runtime.experiments.enableForTest("liveSASS"); |
| InspectorTest.evaluateInPage("simulateBrowserSync()", function() { }); |
| InspectorTest.cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapAttached, onSourceMapAttached); |
| |
| function onSourceMapAttached(event) |
| { |
| var header = event.data; |
| var sourceMap = InspectorTest.cssModel.sourceMapForHeader(header); |
| InspectorTest.addResult("SourceMap is editable: " + sourceMap.editable()); |
| InspectorTest.completeTest(); |
| } |
| } |
| |
| </script> |
| |
| </head> |
| |
| <body onload="runTest()"> |
| <p>Verifies that editable source map is created in case of race between iNotify and BrowserSync.</p> |
| </body> |
| </html> |