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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/preload/dynamic_removing_preload.html

Issue 1615703002: Removal of rel=preload link elements should stop the download. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: third_party/WebKit/LayoutTests/http/tests/preload/dynamic_removing_preload.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/preload/dynamic_adding_preload.html b/third_party/WebKit/LayoutTests/http/tests/preload/dynamic_removing_preload.html
similarity index 79%
copy from third_party/WebKit/LayoutTests/http/tests/preload/dynamic_adding_preload.html
copy to third_party/WebKit/LayoutTests/http/tests/preload/dynamic_removing_preload.html
index 21b0a9bfd6e2df710d46246be3f10ce3a94c2abb..5c6774b923fa5a35cdbb5ef2a8550461c6c44a95 100644
--- a/third_party/WebKit/LayoutTests/http/tests/preload/dynamic_adding_preload.html
+++ b/third_party/WebKit/LayoutTests/http/tests/preload/dynamic_removing_preload.html
@@ -2,7 +2,7 @@
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
- var t = async_test('Makes sure that dynamically added preloaded resource is downloaded');
+ var t = async_test('Makes sure that dynamically removed preloaded resource stop downloading');
</script>
<body>
<script>
@@ -11,8 +11,9 @@
link.rel = "preload";
link.href = "../resources/dummy.js";
document.body.appendChild(link);
+ document.body.removeChild(link);
window.addEventListener("load", t.step_func(function() {
- assert_equals(performance.getEntriesByType("resource").length, 4);
+ assert_equals(performance.getEntriesByType("resource").length, 3);
t.done();
}));
</script>

Powered by Google App Engine
This is Rietveld 408576698