| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 |
| 4 <link rel="stylesheet" href="resources/test-mapping-good.css?rel=123412341234"> |
| 5 |
| 6 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 7 <script src="../../http/tests/inspector/debugger-test.js"></script> |
| 8 <script src="./sass-test.js"></script> |
| 9 <script> |
| 10 |
| 11 function simulateBrowserSync() |
| 12 { |
| 13 var link = document.querySelector("link"); |
| 14 // Simulate iNotify push of new CSS. |
| 15 link.href = "resources/test-mapping-good.css"; |
| 16 // Simluate BrowserSync update styleSheet with a cache-busting URL. |
| 17 setTimeout(() => link.href = "resources/test-mapping-good.css?rel=1234123412
34", 0); |
| 18 } |
| 19 |
| 20 function test() |
| 21 { |
| 22 Runtime.experiments.enableForTest("liveSASS"); |
| 23 InspectorTest.evaluateInPage("simulateBrowserSync()", function() { }); |
| 24 InspectorTest.cssModel.addEventListener(WebInspector.CSSModel.Events.SourceM
apAttached, onSourceMapAttached); |
| 25 |
| 26 function onSourceMapAttached(event) |
| 27 { |
| 28 var header = event.data; |
| 29 var sourceMap = InspectorTest.cssModel.sourceMapForHeader(header); |
| 30 InspectorTest.addResult("SourceMap is editable: " + sourceMap.editable()
); |
| 31 InspectorTest.completeTest(); |
| 32 } |
| 33 } |
| 34 |
| 35 </script> |
| 36 |
| 37 </head> |
| 38 |
| 39 <body onload="runTest()"> |
| 40 <p>Verifies that editable source map is created in case of race between iNotify
and BrowserSync.</p> |
| 41 </body> |
| 42 </html> |
| OLD | NEW |