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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/css/css-link-media-change.html

Issue 1793933002: Don't trigger a link resource fetch on media change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test and made mediaChanged() virtual Created 4 years, 9 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
Index: third_party/WebKit/LayoutTests/http/tests/css/css-link-media-change.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/css/css-link-media-change.html b/third_party/WebKit/LayoutTests/http/tests/css/css-link-media-change.html
new file mode 100644
index 0000000000000000000000000000000000000000..3d6849fe6ae5fde5b5ea76c19598748f38fc917b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/css/css-link-media-change.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<script src="resources/request-logging.js"></script>
+<pre id="result">Request log goes here</pre>
+<script>
+ var link = document.createElement("link");
+ link.setAttribute("rel", "stylesheet");
+ link.setAttribute("media", "all");
+ link.setAttribute("href", "/resources/network-simulator.php?command=log-resource-request&path=sheet.css");
+ document.head.appendChild(link);
+ setTimeout(function(){link.setAttribute("media", "none");});
+</script>

Powered by Google App Engine
This is Rietveld 408576698