Closed Bug 1742752 Opened 3 years ago Closed 2 years ago

GeckoDriver.setScreenOrientation should use Screen Orientation API instead of deprecated mozLockOrientation

Categories

(Remote Protocol :: Marionette, task, P3)

task

Tracking

(firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: m_kato, Assigned: m_kato, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [lang=js])

Attachments

(1 file)

Blocks: 1325110
Keywords: good-first-bug
Whiteboard: [lang=js]

Do you have a link to the screen orientation API? Also do you want to mentor this bug? Note that we usually do not use good-first-bug in this project due to it's complexity. Maybe we can have it as a normal mentored bug?

Flags: needinfo?(m_kato)

Spec: https://www.w3.org/TR/screen-orientation/. And GeckoDriver.prototype.getScreenOrientation uses old deprecated API too.

we usually do not use good-first-bug in this project

OK, I remove good-first-bug

Flags: needinfo?(m_kato)
Keywords: good-first-bug
Whiteboard: [lang=js]

Thanks. So when distilling this information the following changes need to be done:

  1. Update WebDriver:getScreenOrientation to no longer use screen.mozOrientation but screen.orientation. The value to be returned should then be screen.orientation.type.

  2. Update WebDriver:setScreenOrientation to use screen.orientation.lock() to lock the screen to a specific orientation. This call returns a Promise that we would have to await for.

To note here is that the specification mentions that some pre-conditions might have to be fulfilled first, like switching into fullscreen. If we have to do that, then it would have to be added before the call to lock().

More details in how to get started can be found at https://firefox-source-docs.mozilla.org/testing/marionette/index.html

Mentor: hskupin
Whiteboard: [lang=js]
Priority: -- → P3

is anyone working on this . if not can I work?

Hi Sanket. It's great to see your interest! So far we don't have anyone working on it. As such you can get started. See my last comment for details in how to get started with Marionette and what needs to be done. If you have questions don't hesitate to ask. Thanks!

mozLockOrientation is deprecated and it always returns false.
We should use standard API (it is still turned off as default).

Assignee: nobody → m_kato
Status: NEW → ASSIGNED
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/ea5fa5e28a56
GeckoDriver.setScreenOrientation should use Screen Orientation API. r=webdriver-reviewers,whimboo
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: