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

Side by Side Diff: LayoutTests/http/tests/security/referrer-policy-attribute-no-policy.html

Issue 1291613010: Implement referrerpolicy attribute for img elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: actually fix webexposed test this time Created 5 years, 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharness.js"></script>
5 <script src="/resources/testharnessreport.js"></script> 5 <script src="/resources/testharnessreport.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <script> 8 <script>
9 var anch = document.createElement("a"); 9 var anch = document.createElement("a");
10 anch.href = "http://localhost:8000/security/resources/referrer-attr-anch or-target.html#no-policy"; 10 anch.href = "http://localhost:8000/security/resources/referrer-attr-anch or-target.html#no-policy";
11 document.body.appendChild(anch); 11 document.body.appendChild(anch);
12
13 var img = document.createElement("img");
14 img.src = "http://localhost:8000/security/resources/compass.jpg";
15 document.body.appendChild(img);
16
12 test(function () { 17 test(function () {
13 assert_equals(anch.referrerpolicy, ""); 18 assert_equals(anch.referrerpolicy, "");
14 }, "Dynamically created anchor has empty referrerpolicy"); 19 assert_equals(img.referrerpolicy, "");
20 }, "Dynamically created elements have empty referrerpolicy");
15 anch.click(); 21 anch.click();
16 </script> 22 </script>
17 </body> 23 </body>
18 </html> 24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698