gecko-dev/dom/xul/test/test_bug757137.xul

39 lines
1.3 KiB
Plaintext
Raw Normal View History

2012-06-20 19:25:23 +00:00
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
<body xmlns="http://www.w3.org/1999/xhtml">
<div id="content" style="display: none"/>
</body>
<script>
SimpleTest.waitForExplicitFinish();
// Force off out-of-process mozbrowser because we need to grab its
// |window| synchronously from here. Out-of-process docshell creation
// for mozbrowser haves entirely differently.
// XXX why doesn't pushPrefEnv() work here?
var otherWindow = window.open("window_bug757137.xul", "", "chrome");
ok(otherWindow.isChromeWindow, 'XUL window should be a ChromeWindow');
2012-06-20 19:25:23 +00:00
SpecialPowers.pushPrefEnv({"set":[["dom.ipc.tabs.disabled", true]]}, startTest);
function startTest() {
otherWindow.onload = function () {
var w = otherWindow.document.getElementById('f').contentWindow;
ok(w !== null, 'got the |window| for a mozbrowser iframe');
ok(!w.isChromeWindow, 'mozbrowser iframe should not be a ChromeWindow');
otherWindow.close();
SimpleTest.waitForFocus(SimpleTest.finish);
};
}
2012-06-20 19:25:23 +00:00
</script>
</window>