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

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

Issue 10831056: Port the render_view_host_manager_browsertest.cc to content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
Index: chrome/test/data/click-noreferrer-links.html
===================================================================
--- chrome/test/data/click-noreferrer-links.html (revision 148713)
+++ chrome/test/data/click-noreferrer-links.html (working copy)
@@ -1,78 +0,0 @@
-<html>
-
- <head><title>Click noreferrer links</title>
- <script>
- function simulateClick(target) {
- var evt = document.createEvent("MouseEvents");
- evt.initMouseEvent("click", true, true, window,
- 0, 0, 0, 0, 0, false, false,
- false, false, 0, null);
-
- return target.dispatchEvent(evt);
- }
-
- function clickNoRefTargetBlankLink() {
- return simulateClick(document.getElementById("noref_and_tblank_link"));
- }
-
- function clickSameSiteNoRefTargetedLink() {
- return simulateClick(
- document.getElementById("samesite_noref_and_targeted_link"));
- }
-
- function clickSameSiteTargetedLink() {
- return simulateClick(document.getElementById("samesite_targeted_link"));
- }
-
- function clickSameSiteTargetBlankLink() {
- return simulateClick(document.getElementById("samesite_tblank_link"));
- }
-
- function clickTargetBlankLink() {
- return simulateClick(document.getElementById("tblank_link"));
- }
-
- function clickNoRefLink() {
- return simulateClick(document.getElementById("noref_link"));
- }
-
- function testScriptAccessToWindow() {
- // Grab a reference to the existing foo window and access its location.
- var w = window.open("", "foo");
- var url = w.location.href;
- return url != undefined;
- }
-
- function testCloseWindow() {
- // Grab a reference to the existing foo window and close it.
- var w = window.open("", "foo");
- w.close();
- return true;
- }
-
- // Listen to incoming messages and reply to them.
- var receivedMessages = 0;
- window.addEventListener("message", messageReceived, false);
- function messageReceived(event) {
- receivedMessages++;
- event.source.postMessage(event.data, "*");
- }
- </script>
- </head>
-
-<a href="https://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>
-<a href="navigate_opener.html" id="samesite_targeted_link" target="foo">
- same-site target=foo</a><br>
-<a href="title2.html" id="samesite_tblank_link" target="_blank">
- same-site target=_blank</a><br>
-<a href="https://REPLACE_WITH_HOST_AND_PORT/files/title2.html" id="tblank_link"
- target="_blank">target=_blank</a><br>
-<a href="https://REPLACE_WITH_HOST_AND_PORT/files/title2.html" id="noref_link"
- rel="noreferrer">rel=noreferrer</a><br>
-
-</html>

Powered by Google App Engine
This is Rietveld 408576698