Index: content/test/data/click-noreferrer-links.html |
diff --git a/content/test/data/click-noreferrer-links.html b/content/test/data/click-noreferrer-links.html |
index ee011b7008e6ba491fcdffb09feb02a8ce458001..9117f0525847219255d084e5bff6d73a8734dbb7 100644 |
--- a/content/test/data/click-noreferrer-links.html |
+++ b/content/test/data/click-noreferrer-links.html |
@@ -2,6 +2,13 @@ |
<head><title>Click noreferrer links</title> |
<script> |
+ function setOriginForLinks(baseUrl) { |
+ var links = ['noref_and_tblank_link', 'tblank_link', 'noref_link']; |
+ links.forEach(function(linkId) { |
+ link = document.getElementById(linkId); |
+ link.href = baseUrl + link.pathname.substr(1); |
+ }); |
+ } |
function simulateClick(target) { |
var evt = document.createEvent("MouseEvents"); |
evt.initMouseEvent("click", true, true, window, |
@@ -96,9 +103,6 @@ |
</script> |
</head> |
-<a href="http://REPLACE_WITH_HOST_AND_PORT/files/title2.html" |
- id="noref_and_tblank_link" rel="noreferrer" target="_blank"> |
- rel=noreferrer and target=_blank</a><br> |
<a href="title2.html" id="samesite_noref_and_targeted_link" |
rel="noreferrer" target="foo"> |
same-site rel=noreferrer and target=foo</a><br> |
@@ -106,13 +110,22 @@ |
same-site target=foo</a><br> |
<a href="title2.html" id="samesite_tblank_link" target="_blank"> |
same-site target=_blank</a><br> |
-<a href="http://REPLACE_WITH_HOST_AND_PORT/files/title2.html" id="tblank_link" |
- target="_blank">target=_blank</a><br> |
-<a href="http://REPLACE_WITH_HOST_AND_PORT/files/title2.html" id="noref_link" |
- rel="noreferrer">rel=noreferrer</a><br> |
<a href="about:blank" id="blank_targeted_link" target="foo"> |
blank_targeted_link=foo</a><br> |
+<!-- The following set of links have to be fixed at runtime with the proper |
+ scheme://host:port/ string, since the port is randomly generated. The |
+ setOriginForLinks method is provided for facilitating the replacement and |
+ should be called by each browser test utilizing these links. --> |
+<a href="http://REPLACE/title2.html" |
+ id="noref_and_tblank_link" rel="noreferrer" target="_blank"> |
+ rel=noreferrer and target=_blank</a><br> |
+<a href="http://REPLACE/title2.html" id="tblank_link" |
+ target="_blank">target=_blank</a><br> |
+<a href="http://REPLACE/title2.html" id="noref_link" |
+ rel="noreferrer">rel=noreferrer</a><br> |
+ |
+ |
<iframe id="frame1" src="frame_tree/1-1.html"></iframe> |
</html> |