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

Side by Side 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, 7 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="/resources/get-host-info.js"></script> 4 <script src="/resources/get-host-info.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 if (window.testRunner) 8 if (window.testRunner)
9 testRunner.waitUntilDone(); 9 testRunner.waitUntilDone();
10 10
11 if (window.location.origin != get_host_info().HTTPS_ORIGIN) { 11 if (window.location.origin != get_host_info().HTTPS_ORIGIN) {
12 window.location = get_host_info().HTTPS_ORIGIN + window.location.pat hname; 12 window.location = get_host_info().HTTPS_ORIGIN + window.location.pat hname;
13 } else { 13 } else {
14 var img = document.createElement("img"); 14 var img = document.createElement("img");
15
16 // Before calling testRunner.notifyDone (and taking a screenshot of
17 // the page), we need to make sure the image got actually loaded.
18 img.addEventListener("load", function() {
19 testRunner.notifyDone();
20 });
21
15 img.src = "http://127.0.0.1:8000/security/resources/green-if-no-refe rrer.php"; 22 img.src = "http://127.0.0.1:8000/security/resources/green-if-no-refe rrer.php";
16 img.referrerpolicy = "no-referrer-when-downgrade"; 23 img.referrerpolicy = "no-referrer-when-downgrade";
17 document.body.appendChild(img); 24 document.body.appendChild(img);
18 testRunner.notifyDone();
19 } 25 }
20 </script> 26 </script>
21 </body> 27 </body>
22 </html 28 </html>
OLDNEW
« 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