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> |