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

Unified Diff: third_party/WebKit/LayoutTests/fast/preloader/is-preloaded-after-load.html

Issue 2332333003: Make internals.isPreloaded() to remain the same before/after clearPreloads() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const auto& Created 4 years, 3 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/fast/preloader/is-preloaded-after-load-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/preloader/is-preloaded-after-load-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698