Chromium Code Reviews| OLD | NEW |
|---|---|
| 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.href = "http://localhost:8000/security/resources/compass.jpg"; | |
|
Yoav Weiss
2015/08/18 21:09:21
img.src? (Although I'm not sure it's relevant for
estark
2015/08/19 02:53:22
Done.
| |
| 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> |
| OLD | NEW |