mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
2303bad522
--HG-- extra : rebase_source : eee7ae5e4f980e580004b9149a2b1973873e03d2
52 lines
1.7 KiB
XML
52 lines
1.7 KiB
XML
<?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>
|