Port functional/security/test_enable_privilege.py to a Mochitest
Categories
(Core :: XPConnect, task)
Tracking
()
People
(Reporter: whimboo, Assigned: emk)
References
Details
As result of my conversation with Johann earlier today we want to get this test moved over to the web-platform-tests. Mainly because Firefox UI tests will be removed soon, and we need a test harness which doesn't set the security.turn_off_all_security_so_that_viruses_can_take_over_this_computer
preference. And web-platform-tests seem to be a good candidate here, whereby this has to land under the mozilla sub folder.
Current test location:
https://searchfox.org/mozilla-central/rev/30b01f4f60dbcbd6b01500a26b3100c28005cf62/testing/firefox-ui/tests/functional/security/test_enable_privilege.py
Current HTML testcase:
https://searchfox.org/mozilla-central/source/testing/firefox-ui/resources/security/enable_privilege.html
Johann, what kind of component (sub directory) should that test belong to? xpcom
maybe?
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
I'd say this is Core Security. CC'ing Andrew who might be interested in this?
Reporter | ||
Comment 2•5 years ago
|
||
We would like to get rid of all the remaining security tests under testing/marionette. Andrew, do you know someone who could port this bug?
Updated•5 years ago
|
Comment 3•5 years ago
|
||
What this test does is it tries to run
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
If that doesn't throw an exception, then the test fails. I'm not sure why this was a Marionette test in particular. I guess like you said in comment 0, this was probably just a handy test suite that didn't have high privileges enabled.
Do we actually use UniversalXPConnect in Mochitests any more? I thought we'd gotten rid of it outside of Talos. Maybe it is still pref'ed on there. It looks like it is still enabled. I wonder how hard it would be to move the pref into profiles for specific test suites that actually use it.
Comment 4•5 years ago
|
||
I guess IsInAutomation is used for other things, so we probably can't just flip the pref off. We could add an additional pref to disable netscape.security.PrivilegeManager.enablePrivilege even if IsInAutomation is true, but then the test would just be testing that pref and not IsInAutomation.
Comment 5•5 years ago
|
||
What sort of timeline are you looking for getting rid of this test?
Do you know how to run the tests in the mozilla WPT directory? I tried
mach wpt mozilla/tests/binast/domain-restrict-excluded.https.html
mach wpt binast/domain-restrict-excluded.https.html
and neither worked.
Reporter | ||
Comment 6•5 years ago
|
||
I don't care if this would happen in somewhat the next months. Anyway, it's one of the tests which keeping us running the firefox-ui-remote tests in CI, which is not actually worth it.
When I run that it works just fine:
mach wpt testing/web-platform/mozilla/tests/binast/domain-restrict-excluded.https.html
Maybe it needs the full path for the mozilla
sub folder?
Comment 7•5 years ago
|
||
Thanks. I'll try to take a look at this at some point.
Reporter | ||
Comment 8•5 years ago
|
||
Thanks Andrew. If it's not clear when you can work on that, maybe you give some instructions so that this bug could be a mentored one. I'm happy to assist as best as possible.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 9•5 years ago
|
||
Andrew, do you have any feedback to comment 8? It would be great to get this test moved over to wpt.
Reporter | ||
Comment 10•5 years ago
|
||
Looks like with bug 1448967 we remove the enablePrivilege
feature. So I assume there is no need to keep this bug alive? Johann, what do you think?
Comment 11•5 years ago
|
||
Well, with bug 1448967 I can turn it into a regular Mochitest, because enable privileges won't work anywhere.
Updated•5 years ago
|
Comment 12•5 years ago
|
||
It looks like emk is removing the existing test as part of bug 1448967.
Updated•5 years ago
|
Assignee | ||
Comment 13•5 years ago
|
||
Phabricator automatically added marionette-reviewers as a blocking reviewer of the bug 1448967 patch. Please sign off the change.
Assignee | ||
Updated•5 years ago
|
Comment 14•5 years ago
|
||
Based on bug 1448967 landing.
Description
•