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

Unified Diff: content/test/data/click-noreferrer-links.html

Issue 1378403002: Move RFHM browser tests to the embedded test server. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on Charlie's review. Created 5 years, 3 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 | « content/browser/frame_host/render_frame_host_manager_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698