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

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

Issue 1383513005: Ensure window reference is valid when navigating cross-process and back. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a nit. Created 5 years, 2 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 simulateClick(target) { 5 function simulateClick(target) {
6 var evt = document.createEvent("MouseEvents"); 6 var evt = document.createEvent("MouseEvents");
7 evt.initMouseEvent("click", true, true, window, 7 evt.initMouseEvent("click", true, true, window,
8 0, 0, 0, 0, 0, false, false, 8 0, 0, 0, 0, 0, false, false,
9 false, false, 0, null); 9 false, false, 0, null);
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 w.postMessage({message: "msg-with-port", port: mc.port2}, "*", [mc.port2]); 76 w.postMessage({message: "msg-with-port", port: mc.port2}, "*", [mc.port2]);
77 return true; 77 return true;
78 } 78 }
79 79
80 var receivedMessagesViaPort = 0; 80 var receivedMessagesViaPort = 0;
81 function portMessageReceived(event) { 81 function portMessageReceived(event) {
82 receivedMessagesViaPort++; 82 receivedMessagesViaPort++;
83 // Change the title to generate a notification. 83 // Change the title to generate a notification.
84 document.title = event.data; 84 document.title = event.data;
85 } 85 }
86
87 var last_opened_window = undefined;
88 function saveWindowReference() {
89 // Grab a reference to the existing foo window into a global variable
90 // for later testing.
91 last_opened_window = window.open("", "foo");
92 }
93 function getLastOpenedWindowLocation() {
94 return last_opened_window.location.href;
95 }
86 </script> 96 </script>
87 </head> 97 </head>
88 98
89 <a href="http://REPLACE_WITH_HOST_AND_PORT/files/title2.html" 99 <a href="http://REPLACE_WITH_HOST_AND_PORT/files/title2.html"
90 id="noref_and_tblank_link" rel="noreferrer" target="_blank"> 100 id="noref_and_tblank_link" rel="noreferrer" target="_blank">
91 rel=noreferrer and target=_blank</a><br> 101 rel=noreferrer and target=_blank</a><br>
92 <a href="title2.html" id="samesite_noref_and_targeted_link" 102 <a href="title2.html" id="samesite_noref_and_targeted_link"
93 rel="noreferrer" target="foo"> 103 rel="noreferrer" target="foo">
94 same-site rel=noreferrer and target=foo</a><br> 104 same-site rel=noreferrer and target=foo</a><br>
95 <a href="navigate_opener.html" id="samesite_targeted_link" target="foo"> 105 <a href="navigate_opener.html" id="samesite_targeted_link" target="foo">
96 same-site target=foo</a><br> 106 same-site target=foo</a><br>
97 <a href="title2.html" id="samesite_tblank_link" target="_blank"> 107 <a href="title2.html" id="samesite_tblank_link" target="_blank">
98 same-site target=_blank</a><br> 108 same-site target=_blank</a><br>
99 <a href="http://REPLACE_WITH_HOST_AND_PORT/files/title2.html" id="tblank_link" 109 <a href="http://REPLACE_WITH_HOST_AND_PORT/files/title2.html" id="tblank_link"
100 target="_blank">target=_blank</a><br> 110 target="_blank">target=_blank</a><br>
101 <a href="http://REPLACE_WITH_HOST_AND_PORT/files/title2.html" id="noref_link" 111 <a href="http://REPLACE_WITH_HOST_AND_PORT/files/title2.html" id="noref_link"
102 rel="noreferrer">rel=noreferrer</a><br> 112 rel="noreferrer">rel=noreferrer</a><br>
103 <a href="about:blank" id="blank_targeted_link" target="foo"> 113 <a href="about:blank" id="blank_targeted_link" target="foo">
104 blank_targeted_link=foo</a><br> 114 blank_targeted_link=foo</a><br>
105 115
106 <iframe id="frame1" src="frame_tree/1-1.html"></iframe> 116 <iframe id="frame1" src="frame_tree/1-1.html"></iframe>
107 117
108 </html> 118 </html>
OLDNEW
« 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