SimpleTest.registerCleanupFunction(function () { for (const cleanup of gAttachCleanups) {
cleanup();
}
});
/** *Openatab,loadtheurl,waitforittosignalitsreadiness, *connecttothistabviaDevToolsprotocolandreturn. * *Returnsanobjectwithafewhelpfulattributes: *-commands{Object}:Thecommandsobjectdefinedbymodulesfromdevtools/shared/commands *-target{TargetFront}:Thecurrenttop-leveltargetfront. *-doc{HtmlDocument}:thetab'sdocumentthatgotopened
*/
async function attachURL(url) { // Get the current browser window const gBrowser =
Services.wm.getMostRecentWindow("navigator:browser").gBrowser;
// open the url in a new tab, save a reference to the new inner window global object // and wait for it to load. The tests rely on this window object to send a "ready" // event to its opener (the test page). This window reference is used within // the test tab, to reference the webpage being tested against, which is in another // tab. const windowOpened = BrowserTestUtils.waitForNewTab(gBrowser, url); const win = window.open(url, "_blank");
await windowOpened;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.