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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/preload/dynamic_remove_preload_href.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: Added back clear() 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/preload/dynamic_removing_preload.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/preload/dynamic_adding_preload.html b/third_party/WebKit/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html
similarity index 64%
copy from third_party/WebKit/LayoutTests/http/tests/preload/dynamic_adding_preload.html
copy to third_party/WebKit/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html
index 5d07d5d906ed002613271288fd27b7b1aef80c90..34e51f106a74288af893ac2c60811d7156dc92eb 100644
--- a/third_party/WebKit/LayoutTests/http/tests/preload/dynamic_adding_preload.html
+++ b/third_party/WebKit/LayoutTests/http/tests/preload/dynamic_remove_preload_href.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>
@@ -10,10 +10,12 @@
link.as = "script";
link.rel = "preload";
link.href = "../resources/dummy.js";
- link.onload = t.step_func(function() {
+ document.body.appendChild(link);
+ link.href = "";
+ window.addEventListener("load", t.step_func(function() {
assert_equals(performance.getEntriesByType("resource").length, 3);
t.done();
- });
- document.body.appendChild(link);
+ }));
</script>
+<script src="../resources/slow-script.pl?delay=200"></script>
</body>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/preload/dynamic_removing_preload.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698