Bug 1801336 - Don't show hover run message for mv2 without browser action r=willdurand

Differential Revision: https://phabricator.services.mozilla.com/D163333
This commit is contained in:
Tomislav Jovanovic
2022-12-01 13:53:21 +00:00
parent 1e77b7b616
commit aa927e58f2
3 changed files with 33 additions and 4 deletions

View File

@@ -698,11 +698,33 @@ add_task(async function test_messages_origin_controls() {
expectedActionButtonDisabled: true,
},
{
title: "MV2 - when clicked",
title: "MV2 - activeTab without browser action",
manifest: {
manifest_version: 2,
permissions: ["activeTab"],
},
expectedDefaultMessage: NO_ACCESS,
expectedHoverMessage: NO_ACCESS,
expectedActionButtonDisabled: true,
},
{
title: "MV2 - when clicked: activeTab with browser action",
manifest: {
manifest_version: 2,
permissions: ["activeTab"],
browser_action: {},
},
expectedDefaultMessage: WHEN_CLICKED,
expectedHoverMessage: HOVER_RUN_VISIT_ONLY,
expectedActionButtonDisabled: false,
},
{
title: "MV3 - when clicked: activeTab with action",
manifest: {
manifest_version: 3,
permissions: ["activeTab"],
action: {},
},
expectedDefaultMessage: WHEN_CLICKED,
expectedHoverMessage: HOVER_RUN_VISIT_ONLY,
expectedActionButtonDisabled: false,

View File

@@ -116,7 +116,7 @@ add_task(async function test_keyboard_navigation_opens_menu() {
const extension1 = ExtensionTestUtils.loadExtension({
manifest: {
name: "1",
// `activeTab` is needed to enable the action button.
// activeTab and browser_action needed to enable the action button in mv2.
permissions: ["activeTab"],
browser_action: {},
},
@@ -130,8 +130,9 @@ add_task(async function test_keyboard_navigation_opens_menu() {
});
const extension3 = ExtensionTestUtils.loadExtension({
manifest: {
manifest_version: 3,
name: "3",
// `activeTab` is needed to enable the action button.
// activeTab enables the action button without a browser action in mv3.
permissions: ["activeTab"],
},
useAddonManager: "temporary",