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 706301"
<!-- test results are displayed in the html:body -->
target="_blank">Mozilla Bug 706301</a>
</body>
<!-- test code goes here -->
<script type="application/javascript">
<![CDATA[
/** Test for Bug 706301 **/
SimpleTest.waitForExplicitFinish();
function getLengthInChrome(nodelist) {
// Make sure the object is Xray wrapped.
is(nodelist, Cu.unwaiveXrays(nodelist),
"object passed from content to chrome should be Xray-wrapped.");
// Perform the operation.
Object.getOwnPropertyDescriptor(nodelist, 'length');
return !nodelist.length;
}
function finishTestInChrome() {
SimpleTest.finish();
}
function doTest() {
// Set up the callbacks for content.
$('ifr').contentWindow.wrappedJSObject.getLengthInChrome = getLengthInChrome;
$('ifr').contentWindow.wrappedJSObject.finishTestInChrome = finishTestInChrome;
$('ifr').contentWindow.wrappedJSObject.ok = ok;
// Kick off the test.
$('ifr').contentWindow.postMessage({}, '*');
}
]]>
</script>
</window>