Add extra test coverage verifying that userScripts behaves like an optional-only permission
Categories
(Toolkit :: Add-ons Manager, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox135 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
Details
Attachments
(1 file)
In bug 1917000, the "userScripts" permission became an optional-only permission, which was implemented before in bug 1919323. While there is extensive test coverage for "userScripts" in optional_permissions, and extensive coverage for optional-only permissions, there are currently no unit tests that "userScripts" is really an optional-only permission.
Since the UI implementation in bug 1931548 relies on the semantics of optional-only permissions, it would be good to have additional test coverage that explicitly verifies that "userScripts" does not appear in an install prompt.
Assignee | ||
Comment 1•2 months ago
|
||
Updated•2 months ago
|
Comment 3•2 months ago
|
||
Backed out for causing failures at browser_sidebar_categories.js.
Backout link: https://hg.mozilla.org/integration/autoland/rev/61fc9efd29287c5846a222dd2eb4d0a982bcb54e
Failure log: https://treeherder.mozilla.org/logviewer?job_id=488378906&repo=autoland&lineNumber=14279
Assignee | ||
Comment 4•2 months ago
|
||
The test failed because the new test task installs an add-on, and as part of the installation the post-install notification is shown.
The browser_sidebar_categories.js
is scheduled sometime after the updated test. It has certain expectations on the browser UI, expecting simulated Tab presses to focus a certain element. Because the post-install doorhanger is present, its button was focused instead of the content area. I've fixed the test by closing the post-install doorhanger.
To simulate the test failure, I appended loadTestSubscript("browser_sidebar_categories.js");
to the toolkit/mozapps/extensions/test/browser/browser_permission_prompt_userScripts.js
test file and ran ./mach test toolkit/mozapps/extensions/test/browser/browser_permission_prompt_userScripts.js --headless --log-mach-verbose
Description
•