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

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

Issue 162083002: Fix and re-enable NoScriptAccessAfterSwapOut test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial patch Created 6 years, 10 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 | Annotate | Revision Log
« 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 20 matching lines...) Expand all
31 function clickTargetBlankLink() { 31 function clickTargetBlankLink() {
32 return simulateClick(document.getElementById("tblank_link")); 32 return simulateClick(document.getElementById("tblank_link"));
33 } 33 }
34 34
35 function clickNoRefLink() { 35 function clickNoRefLink() {
36 return simulateClick(document.getElementById("noref_link")); 36 return simulateClick(document.getElementById("noref_link"));
37 } 37 }
38 38
39 function testScriptAccessToWindow() { 39 function testScriptAccessToWindow() {
40 // Grab a reference to the existing foo window and access its location. 40 // Grab a reference to the existing foo window and access its location.
41 var w = window.open("", "foo"); 41 try {
42 var url = w.location.href; 42 var w = window.open("", "foo");
43 return url != undefined; 43 var url = w.location.href;
44 return url != undefined;
45 } catch (e) {
46 return false;
47 }
44 } 48 }
45 49
46 function testCloseWindow() { 50 function testCloseWindow() {
47 // Grab a reference to the existing foo window and close it. 51 // Grab a reference to the existing foo window and close it.
48 var w = window.open("", "foo"); 52 var w = window.open("", "foo");
49 w.close(); 53 w.close();
50 return true; 54 return true;
51 } 55 }
52 56
53 // Listen to incoming messages and reply to them. 57 // Listen to incoming messages and reply to them.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 <a href="title2.html" id="samesite_tblank_link" target="_blank"> 93 <a href="title2.html" id="samesite_tblank_link" target="_blank">
90 same-site target=_blank</a><br> 94 same-site target=_blank</a><br>
91 <a href="https://REPLACE_WITH_HOST_AND_PORT/files/title2.html" id="tblank_link" 95 <a href="https://REPLACE_WITH_HOST_AND_PORT/files/title2.html" id="tblank_link"
92 target="_blank">target=_blank</a><br> 96 target="_blank">target=_blank</a><br>
93 <a href="https://REPLACE_WITH_HOST_AND_PORT/files/title2.html" id="noref_link" 97 <a href="https://REPLACE_WITH_HOST_AND_PORT/files/title2.html" id="noref_link"
94 rel="noreferrer">rel=noreferrer</a><br> 98 rel="noreferrer">rel=noreferrer</a><br>
95 99
96 <iframe id="frame1" src="frame_tree/1-1.html"></iframe> 100 <iframe id="frame1" src="frame_tree/1-1.html"></iframe>
97 101
98 </html> 102 </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