diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /layout/base/tests/chrome/file_bug1018265.xul | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/base/tests/chrome/file_bug1018265.xul')
-rw-r--r-- | layout/base/tests/chrome/file_bug1018265.xul | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/layout/base/tests/chrome/file_bug1018265.xul b/layout/base/tests/chrome/file_bug1018265.xul new file mode 100644 index 000000000..91944c5b4 --- /dev/null +++ b/layout/base/tests/chrome/file_bug1018265.xul @@ -0,0 +1,51 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/css" href="chrome://global/skin"?> +<?xml-stylesheet type="text/css" href="/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("testcontent.contentWindow.history.back();", 0); + } + + function didGoBack(e) { + testcontent.removeEventListener("pageshow", didGoBack, true); + shouldHaveTwoNonHiddenContentViewers(); + opener.done(); + window.close(); + } + + function getContentViewer(win) { + return win.QueryInterface(Components.interfaces.nsIInterfaceRequestor) + .getInterface(Components.interfaces.nsIDocShell).contentViewer; + } + + function shouldHaveTwoNonHiddenContentViewers() { + opener.is(getContentViewer(testcontent.contentWindow).isHidden, false, "Top level ContentViewer should not be hidden."); + opener.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> |