| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 | 2 |
| 3 <head><title>Click noreferrer links</title> | 3 <head><title>Click noreferrer links</title> |
| 4 <script> | 4 <script> |
| 5 function setOriginForLinks(baseUrl) { | 5 function setOriginForLinks(baseUrl) { |
| 6 var links = ['noref_and_tblank_link', 'tblank_link', 'noref_link']; | 6 var links = ['noref_and_tblank_link', 'tblank_link', 'noref_link']; |
| 7 links.forEach(function(linkId) { | 7 links.forEach(function(linkId) { |
| 8 link = document.getElementById(linkId); | 8 link = document.getElementById(linkId); |
| 9 link.href = baseUrl + link.pathname.substr(1); | 9 link.href = baseUrl + link.pathname.substr(1); |
| 10 }); | 10 }); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 var last_opened_window = undefined; | 107 var last_opened_window = undefined; |
| 108 function saveWindowReference() { | 108 function saveWindowReference() { |
| 109 // Grab a reference to the existing foo window into a global variable | 109 // Grab a reference to the existing foo window into a global variable |
| 110 // for later testing. | 110 // for later testing. |
| 111 last_opened_window = window.open("", "foo"); | 111 last_opened_window = window.open("", "foo"); |
| 112 } | 112 } |
| 113 function getLastOpenedWindowLocation() { | 113 function getLastOpenedWindowLocation() { |
| 114 return last_opened_window.location.href; | 114 return last_opened_window.location.href; |
| 115 } | 115 } |
| 116 |
| 117 function openWindowWithTargetAndFeatures(path, target, features) { |
| 118 var w = window.open(path, target, features); |
| 119 return w !== undefined; |
| 120 } |
| 116 </script> | 121 </script> |
| 117 </head> | 122 </head> |
| 118 | 123 |
| 119 <a href="title2.html" id="samesite_noref_and_targeted_link" | 124 <a href="title2.html" id="samesite_noref_and_targeted_link" |
| 120 rel="noreferrer" target="foo"> | 125 rel="noreferrer" target="foo"> |
| 121 same-site rel=noreferrer and target=foo</a><br> | 126 same-site rel=noreferrer and target=foo</a><br> |
| 122 <a href="title2.html" id="samesite_noopener_and_targeted_link" | 127 <a href="title2.html" id="samesite_noopener_and_targeted_link" |
| 123 rel="noopener" target="foo"> | 128 rel="noopener" target="foo"> |
| 124 same-site rel=noopener and target=foo</a><br> | 129 same-site rel=noopener and target=foo</a><br> |
| 125 <a href="navigate_opener.html" id="samesite_targeted_link" target="foo"> | 130 <a href="navigate_opener.html" id="samesite_targeted_link" target="foo"> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 143 target="_blank">target=_blank</a><br> | 148 target="_blank">target=_blank</a><br> |
| 144 <a href="http://REPLACE/title2.html" id="noref_link" | 149 <a href="http://REPLACE/title2.html" id="noref_link" |
| 145 rel="noreferrer">rel=noreferrer</a><br> | 150 rel="noreferrer">rel=noreferrer</a><br> |
| 146 <a href="http://REPLACE/title2.html" id="noopener_link" | 151 <a href="http://REPLACE/title2.html" id="noopener_link" |
| 147 rel="noopener">rel=opener</a><br> | 152 rel="noopener">rel=opener</a><br> |
| 148 | 153 |
| 149 | 154 |
| 150 <iframe id="frame1" src="frame_tree/1-1.html"></iframe> | 155 <iframe id="frame1" src="frame_tree/1-1.html"></iframe> |
| 151 | 156 |
| 152 </html> | 157 </html> |
| OLD | NEW |