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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/loading/download_only_supported_stylesheet_types.html

Issue 1623403002: Remove fetching stylesheets with unsupported type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review Created 4 years, 11 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/http/tests/loading/download_only_supported_stylesheet_types-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/loading/download_only_supported_stylesheet_types.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/download_only_supported_stylesheet_types.html b/third_party/WebKit/LayoutTests/http/tests/loading/download_only_supported_stylesheet_types.html
new file mode 100644
index 0000000000000000000000000000000000000000..3fc2d0632ccbcb83be17b480696ef84768162968
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/download_only_supported_stylesheet_types.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+ var t = async_test('Makes sure that unsupported stylesheet types are neither preloaded nor loaded');
+ var cssLoaded = false;
+ var jsLoaded = false;
+ var noTypeLoaded = false;
+</script>
+<script src="../resources/slow-script.pl?delay=500"></script>
+<link rel=stylesheet href="../resources/dummy.css?1" type="text/css" onload="cssLoaded = true;">
+<link rel=stylesheet href="../resources/dummy.css?2" type="application/javascript" onload="jsLoaded = true;">
+<link rel=stylesheet href="../resources/dummy.css?3" onload="noTypeLoaded = true;">
+<script>
+ window.addEventListener("load", t.step_func(function() {
+ var entries = performance.getEntriesByType("resource");
+ for (var i = 0; i < entries.length; ++i) {
+ console.log(entries[i].name);
+ }
+ assert_equals(entries.length, 5);
+ assert_true(cssLoaded, "text/css triggered load event");
+ assert_false(jsLoaded, "application/javascript triggered load event");
+ assert_true(noTypeLoaded, "no type triggered load event");
+ t.done();
+ }));
+</script>
+
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/loading/download_only_supported_stylesheet_types-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698