Open Bug 1738348 Opened 3 years ago Updated 2 years ago

Add support for browser.system.cpu, browser.system.memory, and browser.system.display

Categories

(WebExtensions :: Compatibility, enhancement, P5)

enhancement

Tracking

(Not tracked)

People

(Reporter: mkaply, Unassigned)

References

(Depends on 2 open bugs)

Details

(Whiteboard: [wfh])

I was investigating why ProctorU testing doesn't work on Firefox.

They use an extension:

https://www.proctoru.com/firefox

which can be tested here:

https://go.proctoru.com/testitout

It fails on Firefox because it can't query information about the cpu or memory (they are able to get display somehow).

The APIs that we don't support are:

https://developer.chrome.com/docs/extensions/reference/system_cpu/
https://developer.chrome.com/docs/extensions/reference/system_memory/
https://developer.chrome.com/docs/extensions/reference/system_display/

We should implement these to allow this testing (and other apps) to work on Firefox.

It will be useful for me too

@mkaply, does that addon need all those to work?

Severity: -- → N/A
Priority: -- → P5

system.cpu and system.memory are relatively easy to support,
but system.display is significantly more involved.

The API used to be available to (legacy) Chrome apps, but extension support was introduced without real justification in https://bugs.chromium.org/p/chromium/issues/detail?id=392842

It doesn't need system.display it appears, it somehow gets that information.

Depends on: 1807498
Depends on: 1807506

With the patches from bug 1807498 and bug 1807506, I'm able to get the ProtctorU test to pass. Unfortunately, their extension doesn't include system.cpu and system.memory permissions, so I had to modify the patches to make these APIs permissionless to test locally.

Mike, does Mozilla have a contact at ProtctorU? We'll need to tell them to update their manifest.json

Flags: needinfo?(mozilla)

Mike, does Mozilla have a contact at ProtctorU? We'll need to tell them to update their manifest.json

We don't, but I can check. So they have these settings in the Chrome manifest.json just not Firefox?

Flags: needinfo?(mozilla)

(In reply to Mike Kaply [:mkaply] from comment #6)

Mike, does Mozilla have a contact at ProtctorU? We'll need to tell them to update their manifest.json

We don't, but I can check. So they have these settings in the Chrome manifest.json just not Firefox?

Correct. The Firefox version of their extension is missing these permissions, the Chrome version has them.

(In reply to Mike Kaply [:mkaply] from comment #4)

It doesn't need system.display it appears, it somehow gets that information.

I think support for browser.system.display will be important for MV3 service worker background scripts. Especially system.display.getInfo() to get display size/metrics, as window.screen won't be available in background service workers. You might need that for positioning and sizing of popups to be opened by the script.

Since support for system.display API is being de-prioritized in context of this issue, should I maybe create a new issue requesting support specifically for system.display (or even just for system.display.getInfo()) ?

Yes, it would probably be useful to have a system.display specific bug with justification.

You need to log in before you can comment on or make changes to this bug.