diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /layout/base/tests/chrome/file_bug1018265.xhtml | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/base/tests/chrome/file_bug1018265.xhtml')
-rw-r--r-- | layout/base/tests/chrome/file_bug1018265.xhtml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/layout/base/tests/chrome/file_bug1018265.xhtml b/layout/base/tests/chrome/file_bug1018265.xhtml new file mode 100644 index 0000000000..a645c325df --- /dev/null +++ b/layout/base/tests/chrome/file_bug1018265.xhtml @@ -0,0 +1,50 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/css" href="chrome://global/skin"?> +<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=1018265 +--> +<window title="Mozilla Bug 1018265" + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + onload="setTimeout(run, 0);"> + + <!-- test code goes here --> + <script type="application/javascript"> + <![CDATA[ + + /** Test for Bug 1018265 **/ + + var testcontent = null; + + function run() { + testcontent = document.getElementById("testcontent"); + shouldHaveTwoNonHiddenContentViewers(); + testcontent.setAttribute("src", "foobarpage"); + setTimeout(errorPageLoaded, 2500) + } + + function errorPageLoaded() { + testcontent.addEventListener("pageshow", didGoBack, true); + setTimeout(function() {testcontent.contentWindow.history.back();}, 0); + } + + function didGoBack(e) { + testcontent.removeEventListener("pageshow", didGoBack, true); + shouldHaveTwoNonHiddenContentViewers(); + window.arguments[0].done(); + window.close(); + } + + function getContentViewer(win) { + return win.docShell.contentViewer; + } + + function shouldHaveTwoNonHiddenContentViewers() { + window.arguments[0].is(getContentViewer(testcontent.contentWindow).isHidden, false, "Top level ContentViewer should not be hidden."); + window.arguments[0].is(getContentViewer(testcontent.contentWindow.frames[0]).isHidden, false, " Iframe's ContentViewer should not be hidden."); + } + ]]> + </script> + + <browser type="content" id="testcontent" flex="1" src="data:text/html,<iframe></iframe>"/> +</window> |