| 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..938cc0a639b552d94adaefabbbad37072cb56b51
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/preloader/is-preloaded-after-load.html
|
| @@ -0,0 +1,31 @@
|
| +<body>
|
| +<script>
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.waitUntilDone();
|
| +}
|
| +
|
| +function test()
|
| +{
|
| + if (window.internals) {
|
| + console.log((internals.isPreloaded("resources/image1.png") ? "PASS" : "FAIL") + ": image1.png");
|
| + console.log((internals.isPreloaded("resources/non-existant.js") ? "PASS" : "FAIL") + ": non-existant.js");
|
| + }
|
| +}
|
| +
|
| +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>
|
| +<script>document.write("<plaintext>");</script>
|
| +<img src=resources/image1.png>
|
|
|