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

Side by Side Diff: content/test/data/click-nocontent-link.html

Issue 13846007: Allow showing pending URL for new tab navigations, but only if safe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/renderer/render_view_impl.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
(Empty)
1 <html>
2
3 <head><title>Click nocontent link</title>
4 <script>
5 function simulateClick(target) {
6 var evt = document.createEvent("MouseEvents");
7 evt.initMouseEvent("click", true, true, window,
8 0, 0, 0, 0, 0, false, false,
9 false, false, 0, null);
10
11 return target.dispatchEvent(evt);
12 }
13
14 function clickNoContentTargetedLink() {
15 return simulateClick(document.getElementById("nocontent_targeted_link"));
16 }
17
18 function clickNoContentScriptedTargetedLink() {
19 return simulateClick(document.getElementById(
20 "nocontent_scripted_targeted_link"));
21 }
22
23 var w;
24 function modifyNewWindow() {
25 // Grab a reference to the existing foo window and modify its content.
26 w = window.open("", "foo");
27 w.document.body.innerHTML += "Modified";
28
29 // Also modify the title to give the test a notification to listen for.
30 // Use a timeout so that the didAccessInitialDocument notification arrives
31 // first.
32 setTimeout('w.document.title = "Modified Title"');
33 return true;
34 }
35 </script>
36 </head>
37
38 <a href="/nocontent" id="nocontent_targeted_link" target="foo">
39 /nocontent target=foo</a><br>
40 <button onclick="modifyNewWindow()">Modify New Window</button><br>
41
42 <a href="/nocontent" id="nocontent_scripted_targeted_link" target="foo"
43 onclick="modifyNewWindow()">
44 /nocontent scripted target=foo</a><br>
45
46 </html>
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698