Enable `test_ext_scripting_permissions.html` test file for Android and Linux/e10s
Categories
(WebExtensions :: General, task, P2)
Tracking
(firefox102 fixed)
Tracking | Status | |
---|---|---|
firefox102 | --- | fixed |
People
(Reporter: willdurand, Assigned: robwu)
References
Details
(Whiteboard: [addons-jira])
Attachments
(1 file)
Bug 1760451 introduced a new test file that is currently disabled for Android because it hangs (similar symptoms that led us to discover Bug 1766822). We should re-enable this test on Android.
Update (2022-05-11): the test file has been disabled for linux without fission (os == 'linux' && !fission
).
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
This test is consistently failing locally for me on macOS, artifact OPT build. I have been trying to get this test to pass with different versions of m-c over the past 3 weeks, but it fails consistently. Command is:
./mach test toolkit/components/extensions/test/mochitest/test_ext_scripting_permissions.html --tag=remote-webextensions --log-mach-verbose
Even with the patch from bug 1766822, the test gets stuck after opening https://example.org/?2
. Presumably because the content script has not run.
One of the theories that I've considered is that permissions.request()
resolves before the actual permission update has been propagated to the content processes. If that's the case, then doing roundtrips with the content process should get the test to pass. But even with the following patch the test continues to be stuck:
diff --cc toolkit/components/extensions/parent/ext-permissions.js
index 69bbfc92d4023,69bbfc92d4023..fe5f7c79f0d7f
--- a/toolkit/components/extensions/parent/ext-permissions.js
+++ b/toolkit/components/extensions/parent/ext-permissions.js
@@@ -73,6 -73,6 +73,11 @@@ this.permissions = class extends Extens
getAPI(context) {
let { extension } = context;
++ async function pingpong() {
++ await extension.broadcast("Extension:UpdatePermissions", {id: "invalid"});
++ await extension.broadcast("Extension:UpdatePermissions", {id: "invalid"});
++ }
++
return {
permissions: {
async request(perms) {
@@@ -134,6 -134,6 +139,7 @@@
}
await ExtensionPermissions.add(extension.id, perms, extension);
++ await pingpong();
return true;
},
@@@ -169,6 -169,6 +175,7 @@@
permissions,
extension
);
++ await pingpong();
return true;
},
The test passes on CI.
Shane tried to run the test locally (even with --verify
), but he is not able to reproduce the failure on macOS.
Tom confirmed that the test passes on Windows.
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
With the (updated) patch from bug 1766822, the test passes locally. I've attached a patch to re-enable the test.
Assignee | ||
Updated•3 years ago
|
Comment 5•3 years ago
|
||
bugherder |
Description
•