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:
@@ -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");
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user