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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/click-nocontent-link.html
diff --git a/content/test/data/click-nocontent-link.html b/content/test/data/click-nocontent-link.html
new file mode 100644
index 0000000000000000000000000000000000000000..e60b5138338808151ff505aa7bb56b5babeb7a33
--- /dev/null
+++ b/content/test/data/click-nocontent-link.html
@@ -0,0 +1,46 @@
+<html>
+
+ <head><title>Click nocontent link</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 clickNoContentTargetedLink() {
+ return simulateClick(document.getElementById("nocontent_targeted_link"));
+ }
+
+ function clickNoContentScriptedTargetedLink() {
+ return simulateClick(document.getElementById(
+ "nocontent_scripted_targeted_link"));
+ }
+
+ var w;
+ function modifyNewWindow() {
+ // Grab a reference to the existing foo window and modify its content.
+ w = window.open("", "foo");
+ w.document.body.innerHTML += "Modified";
+
+ // Also modify the title to give the test a notification to listen for.
+ // Use a timeout so that the didAccessInitialDocument notification arrives
+ // first.
+ setTimeout('w.document.title = "Modified Title"');
+ return true;
+ }
+ </script>
+ </head>
+
+<a href="/nocontent" id="nocontent_targeted_link" target="foo">
+ /nocontent target=foo</a><br>
+<button onclick="modifyNewWindow()">Modify New Window</button><br>
+
+<a href="/nocontent" id="nocontent_scripted_targeted_link" target="foo"
+ onclick="modifyNewWindow()">
+ /nocontent scripted target=foo</a><br>
+
+</html>
« 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