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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sass/test-mapping-with-cache-busting-url.html

Issue 1965223003: DevTools: liveSASS should tolerate race between iNotify and BrowserSync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sass/test-mapping-with-cache-busting-url-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/sass/test-mapping-with-cache-busting-url.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/test-mapping-with-cache-busting-url.html b/third_party/WebKit/LayoutTests/inspector/sass/test-mapping-with-cache-busting-url.html
new file mode 100644
index 0000000000000000000000000000000000000000..b971122855ee198e496ee07acb7742d9da8b0ee0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/test-mapping-with-cache-busting-url.html
@@ -0,0 +1,42 @@
+<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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sass/test-mapping-with-cache-busting-url-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698