Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

add_task(function specify_both() {
// Specifying both should throw.
SimpleTest.doesThrow(() => {
ChromeUtils.registerWindowActor("TestWindow", {
},
},
});
}, "Should throw if both moduleURI and esModuleURI are specified.");
SimpleTest.doesThrow(() => {
ChromeUtils.registerWindowActor("TestWindow", {
},
},
});
}, "Should throw if both moduleURI and esModuleURI are specified.");
SimpleTest.doesThrow(() => {
ChromeUtils.registerWindowActor("TestWindow", {
},
},
});
}, "Should throw if both moduleURI and esModuleURI are specified.");
SimpleTest.doesThrow(() => {
ChromeUtils.registerWindowActor("TestWindow", {
},
},
});
}, "Should throw if both moduleURI and esModuleURI are specified.");
});
add_task(function specify_mixed() {
// Mixing JSM and ESM should work.
try {
ChromeUtils.registerWindowActor("TestWindow", {
},
},
});
} finally {
ChromeUtils.unregisterWindowActor("TestWindow");
}
try {
ChromeUtils.registerWindowActor("TestWindow", {
},
},
});
} finally {
ChromeUtils.unregisterWindowActor("TestWindow");
}
});