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

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

Issue 9108001: Adds support for calling postMessage on a frame living in a different renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Invert check. Created 8 years, 7 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 | « no previous file | chrome/test/data/post_message.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/click-noreferrer-links.html
diff --git a/chrome/test/data/click-noreferrer-links.html b/chrome/test/data/click-noreferrer-links.html
index 867279ac11be0278cbc08ae3a823bcf5626ee472..f9b1a0d9784da4626eb8c2197e2fa65d5f1b620a 100644
--- a/chrome/test/data/click-noreferrer-links.html
+++ b/chrome/test/data/click-noreferrer-links.html
@@ -24,6 +24,10 @@
return simulateClick(document.getElementById("samesite_targeted_link"));
}
+ function clickSameSiteTargetBlankLink() {
+ return simulateClick(document.getElementById("samesite_tblank_link"));
+ }
+
function clickTargetBlankLink() {
return simulateClick(document.getElementById("tblank_link"));
}
@@ -46,6 +50,13 @@
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>
@@ -56,6 +67,9 @@
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"
« no previous file with comments | « no previous file | chrome/test/data/post_message.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698