forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1741545 add sitepermission category to about:addons r=fluent-revi…
…ewers,rpl Differential Revision: https://phabricator.services.mozilla.com/D131566
- Loading branch information
1 parent
ec9a017
commit 39b6e50
Showing
10 changed files
with
163 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,6 +164,16 @@ add_task(async function enableHtmlViews() { | |
}, | ||
type: "extension", | ||
}, | ||
{ | ||
id: "[email protected]", | ||
name: "Test site permission add-on", | ||
creator: { name: "you got it" }, | ||
description: "permission description", | ||
fullDescription: "detailed description", | ||
siteOrigin: "http://mochi.test", | ||
sitePermissions: ["midi"], | ||
type: "sitepermission", | ||
}, | ||
{ | ||
id: "[email protected]", | ||
name: "Test theme", | ||
|
@@ -782,6 +792,44 @@ add_task(async function testStaticTheme() { | |
await closeView(win); | ||
}); | ||
|
||
add_task(async function testSitePermission() { | ||
let win = await loadInitialView("sitepermission"); | ||
|
||
// The list card. | ||
let card = getAddonCard(win, "[email protected]"); | ||
ok(!card.hasAttribute("expanded"), "The list card is not expanded"); | ||
|
||
// Load the detail view. | ||
let loaded = waitForViewLoad(win); | ||
card.querySelector('[action="expand"]').click(); | ||
await loaded; | ||
|
||
card = getAddonCard(win, "[email protected]"); | ||
|
||
// Check all the deck buttons are hidden. | ||
assertDeckHeadingHidden(card.details.tabGroup); | ||
|
||
let rows = getDetailRows(card); | ||
|
||
// Automatic updates. | ||
let row = rows.shift(); | ||
checkLabel(row, "updates"); | ||
|
||
// Author. | ||
let author = rows.shift(); | ||
checkLabel(author, "author"); | ||
|
||
is(rows.length, 0, "There was only 1 row"); | ||
|
||
let permissions = Array.from( | ||
card.querySelectorAll(".addon-permissions-list .permission-info") | ||
); | ||
is(permissions.length, 1, "a permission is listed"); | ||
is(permissions[0].textContent, "Access MIDI devices", "got midi permission"); | ||
|
||
await closeView(win); | ||
}); | ||
|
||
add_task(async function testPrivateBrowsingExtension() { | ||
Services.telemetry.clearEvents(); | ||
let id = "[email protected]"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters