Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<?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"?>
<!--
-->
<window title="Mozilla Bug 793433"
<!-- test results are displayed in the html:body -->
target="_blank">Mozilla Bug 793433</a>
<p id="display"></p>
<div id="content" style="display: none"/>
</body>
<!-- test code goes here -->
<script type="application/javascript"><![CDATA[
function shouldThrow(fun, args, msg) {
try {
fun.apply(this, args);
ok(false, msg);
} catch (e) {
ok(true, msg+" -- "+e);
}
}
function do_registerTopLevelWindow(win) {
Services.appShell.registerTopLevelWindow(win);
}
shouldThrow(
do_registerTopLevelWindow, [null],
"registering null as a top-level window should throw");
shouldThrow(
do_registerTopLevelWindow, [{}],
"registering a void object as a top-level window should throw");
]]></script>
</window>