diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /browser/base/content/test/siteIdentity/test_web_controlled_blank.html | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/base/content/test/siteIdentity/test_web_controlled_blank.html')
-rw-r--r-- | browser/base/content/test/siteIdentity/test_web_controlled_blank.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/browser/base/content/test/siteIdentity/test_web_controlled_blank.html b/browser/base/content/test/siteIdentity/test_web_controlled_blank.html new file mode 100644 index 0000000000..35c1fd4ca2 --- /dev/null +++ b/browser/base/content/test/siteIdentity/test_web_controlled_blank.html @@ -0,0 +1,36 @@ +<!doctype html> +<html> + <head> + <title>Bug 1813463: Web controlled about:blank</title> + </head> + <!-- + This work is marked with CC0 1.0. To view a copy of this license, + visit http://creativecommons.org/publicdomain/zero/1.0 + --> + <body> + <p><a href="#" id="document_write">document.write example</a></p> + <p><a href="#" id="innerhtml">innerHTML example</a></p> + + <script> + document.getElementById("document_write").addEventListener("click", function (aEvent) { + aEvent.preventDefault(); + let popup = window.open("about:blank", "_blank", "width=800,height=600,popup"); + popup.document.write(` + <h1>check security info</h1> + <p>initial window.location = ${popup.location}</p> + <script> + document.write("<p>new window.location = " + window.location + "</p>") + <${"/"}script> + `); + }); + document.getElementById("innerhtml").addEventListener("click", function (aEvent) { + aEvent.preventDefault(); + let popup = window.open("about:blank", "_blank", "width=800,height=600,popup"); + popup.stop(); + popup.document.body.innerHTML = ` + <h1>check security info</h1> + <p>window.location = ${popup.location}</p>`; + }); + </script> + </body> +</html> |