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 853283"
<!-- test results are displayed in the html:body -->
target="_blank">Mozilla Bug 853283</a>
<!-- test code goes here -->
<script type="application/javascript">
/** Test nsNavigatorSH::Resolve in conjunction with Xrays.**/
function go() {
// This chrome document already has Xrays to the content scope, but we use a
// a sandbox anyway to make sure that the global in play here isn't an
// nsIDOMWindow. Otherwise, the resolve hook might just end up squeaking by
// with the chrome window.
var iwin = $('ifr').contentWindow;
var sb = new Cu.Sandbox(window);
sb.iwin = iwin;
sb.ok = ok;
Cu.evalInSandbox('try {iwin.navigator.mozContacts; ok(true, "Didnt throw"); } catch (e) { ok(false, "Threw: " + e);}', sb);