Index: third_party/WebKit/LayoutTests/fast/preloader/is-preloaded-after-load.html |
diff --git a/third_party/WebKit/LayoutTests/fast/preloader/is-preloaded-after-load.html b/third_party/WebKit/LayoutTests/fast/preloader/is-preloaded-after-load.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..605ca8cb418bf2b972c9d870cc3ab4be03e45ef5 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/preloader/is-preloaded-after-load.html |
@@ -0,0 +1,29 @@ |
+<body> |
+<script> |
+if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+} |
+ |
+function test() |
+{ |
+ if (window.internals) |
+ console.log(internals.isPreloaded("resources/image1.png") ? "PASS" : "FAIL"); |
+} |
+ |
+window.addEventListener('DOMContentLoaded', function () { |
+ test(); |
+ setTimeout(function() { |
+ test(); |
+ if (window.testRunner) { |
+ testRunner.notifyDone(); |
+ } |
+ }, 100); |
+}, false); |
+</script> |
+internals.isPreloaded() should remain the same even after |
+ResourceFetcher::clearPreloads() is called (around document's load event). |
+crbug.com/643621 |
+<script src=resources/non-existant.js></script> |
Yoav Weiss
2016/09/15 06:57:03
Can you also test that non-existant.js isPreloaded
hiroshige
2016/09/15 08:04:40
Done.
|
+<script>document.write("<plaintext>");</script> |
+<img src=resources/image1.png> |