Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android'
- Manifest: js/xpconnect/tests/chrome/chrome.toml
<?xml version="1.0"?>
<!--
-->
<!-- test results are displayed in the html:body -->
<iframe id="ifr" src="http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/file_bug706301.html" onload="doTest();" />
</body>
<!-- test code goes here -->
<script type="application/javascript">
<![CDATA[
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>