summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/click-noreferrer-links.html
diff options
context:
space:
mode:
authorcreis@google.com <creis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-22 17:53:25 +0000
committercreis@google.com <creis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-22 17:53:25 +0000
commit2b74c093728f3bf35a0dc6b444bde69074f99f5d (patch)
tree8878e66d5b532d77a72c78579f744a3f45e12890 /chrome/test/data/click-noreferrer-links.html
parent2461cf0a67fec9bf61c5c80ca64a9a234c0d0e8d (diff)
downloadchromium_src-2b74c093728f3bf35a0dc6b444bde69074f99f5d.zip
chromium_src-2b74c093728f3bf35a0dc6b444bde69074f99f5d.tar.gz
chromium_src-2b74c093728f3bf35a0dc6b444bde69074f99f5d.tar.bz2
Swaps renderer processes on links with rel=noreferrer and target=_blank.
We now detect these types of navigations in RenderView and allow the browser process to handle them. This allows us to swap process if the navigation is cross-site. Requires exposing suppressOpenerInNewFrame in WebFrame to accurately detect these links. BUG=24447 TEST=RenderViewHostManagerTest.SwapProcessOnRelNoreferrerWithTargetBlank Review URL: http://codereview.chromium.org/284015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29783 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/click-noreferrer-links.html')
-rw-r--r--chrome/test/data/click-noreferrer-links.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/chrome/test/data/click-noreferrer-links.html b/chrome/test/data/click-noreferrer-links.html
new file mode 100644
index 0000000..a066355
--- /dev/null
+++ b/chrome/test/data/click-noreferrer-links.html
@@ -0,0 +1,37 @@
+<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 clickTargetBlankLink() {
+ return simulateClick(document.getElementById("tblank_link"));
+ }
+
+ function clickNoRefLink() {
+ return simulateClick(document.getElementById("noref_link"));
+ }
+
+ </script>
+ </head>
+
+<a href="https://127.0.0.1:9443/files/title1.html" id="noref_and_tblank_link"
+ rel="noreferrer" target="_blank">rel=noreferrer and target=_blank</a><br>
+<a href="https://127.0.0.1:9443/files/title1.html" id="tblank_link"
+ target="_blank">target=_blank</a><br>
+<a href="https://127.0.0.1:9443/files/title1.html" id="noref_link"
+ rel="noreferrer">rel=noreferrer</a><br>
+
+</html>
+