Bug 1944104 - [devtools] Flag Content Script and WindowGlobal targets with related addon-id. r=devtools-reviewers,bomsy

Differential Revision: https://phabricator.services.mozilla.com/D235679
This commit is contained in:
Alexandre Poirot
2025-02-11 13:41:36 +00:00
parent ba5d494ec5
commit 83d08122aa
5 changed files with 11 additions and 0 deletions

View File

@@ -101,6 +101,11 @@ add_task(async function () {
}
);
const targets = await targetCommand.getAllTargets(targetCommand.ALL_TYPES);
for(const targetFront of targets) {
is(targetFront.addonId, extension.id, `Target ${targetFront.actorID} has the right addonId attribute`);
}
await targetCommand.reloadTopLevelTarget();
info("Wait for next dom-loading DOCUMENT_EVENT");

View File

@@ -213,6 +213,7 @@ async function testWebExtension() {
"the web extension target is of frame type, because it inherits from WindowGlobalTargetActor"
);
is(targetFront.isTopLevel, true, "This is flagged as top level");
is(targetFront.addonId, extension.id, "The addonId attribute is correct");
targetCommand.destroy();