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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html

Issue 1907413003: Wait until the test page is fully loaded before dumping the contents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweaking a comment. Created 4 years, 8 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 | « third_party/WebKit/LayoutTests/http/tests/navigation/resources/notify-done.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html b/third_party/WebKit/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html
index a461f7242eb8159b944b37116e4e22013eefe9e4..a3d0297ee783aa527cff97fdf2aa9756f4d27675 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/referrer-policy-attribute-img-no-referrer-when-downgrade.html
@@ -12,11 +12,17 @@
window.location = get_host_info().HTTPS_ORIGIN + window.location.pathname;
} else {
var img = document.createElement("img");
+
+ // Before calling testRunner.notifyDone (and taking a screenshot of
+ // the page), we need to make sure the image got actually loaded.
+ img.addEventListener("load", function() {
+ testRunner.notifyDone();
+ });
+
img.src = "http://127.0.0.1:8000/security/resources/green-if-no-referrer.php";
img.referrerpolicy = "no-referrer-when-downgrade";
document.body.appendChild(img);
- testRunner.notifyDone();
}
</script>
</body>
-</html
+</html>
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/navigation/resources/notify-done.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698