summaryrefslogtreecommitdiffstats
path: root/browser/components/sessionstore/test/browser_459906_sample.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /browser/components/sessionstore/test/browser_459906_sample.html
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/sessionstore/test/browser_459906_sample.html')
-rw-r--r--browser/components/sessionstore/test/browser_459906_sample.html41
1 files changed, 41 insertions, 0 deletions
diff --git a/browser/components/sessionstore/test/browser_459906_sample.html b/browser/components/sessionstore/test/browser_459906_sample.html
new file mode 100644
index 0000000000..6f1c6a52ef
--- /dev/null
+++ b/browser/components/sessionstore/test/browser_459906_sample.html
@@ -0,0 +1,41 @@
+<!-- Testcase originally by David Bloom <bloom@google.com> -->
+
+<!DOCTYPE html>
+<title>Test for bug 459906</title>
+
+<body>
+<iframe src="data:text/html;charset=utf-8,not_on_localhost"></iframe>
+<iframe></iframe>
+
+<script type="application/javascript">
+ var loadCount = 0;
+ frames[0].addEventListener("DOMContentLoaded", handleLoad);
+ frames[1].addEventListener("DOMContentLoaded", handleLoad);
+ function handleLoad() {
+ if (++loadCount < 2)
+ return;
+ frames[0].removeEventListener("DOMContentLoaded", handleLoad);
+ frames[1].removeEventListener("DOMContentLoaded", handleLoad);
+ frames[0].document.designMode = "on";
+ frames[0].document.__defineGetter__("designMode", function() {
+ // inject a cross domain file ...
+ var documentInjected = false;
+ document.getElementsByTagName("iframe")[0].onload =
+ function() { documentInjected = true; };
+ frames[0].location = "browser_459906_empty.html";
+
+ // ... and ensure that it has time to load
+ for (var c = 0; !documentInjected && c < 20; c++) {
+ var r = new XMLHttpRequest();
+ r.open("GET", location.href, false);
+ r.overrideMimeType("text/plain");
+ r.send(null);
+ }
+
+ return "on";
+ });
+
+ frames[1].document.designMode = "on";
+ }
+</script>
+</body>