Open Bug 1855028 Opened 2 years ago Updated 2 days ago

Implement "browser.setClientWindowState" command

Categories

(Remote Protocol :: WebDriver BiDi, task, P3)

task
Points:
2

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 3 open bugs, )

Details

(Whiteboard: [webdriver:m19][webdriver:triage])

Attachments

(2 files, 4 obsolete files)

No description provided.
Whiteboard: [webdriver:m9]

The WebDriver BiDi spec is not done yet. As such we cannot implement it for M9. Lets push onto the backlog for now.

Whiteboard: [webdriver:m9] → [webdriver:backlog]

I accidentally took over the points when cloning the former bug. We need to discuss the complexity.

Points: 8 → ---
Whiteboard: [webdriver:backlog] → [webdriver:10]
Whiteboard: [webdriver:10] → [webdriver:11]
Whiteboard: [webdriver:11] → [webdriver:m11]
Points: --- → 5
Whiteboard: [webdriver:m11] → [webdriver:backlog]
Summary: Implement "browser.setWindowBounds" command → Implement "browser.setClientWindowState" command
Whiteboard: [webdriver:backlog] → [webdriver:m13]

I know this is in not is not directly blocking implementing browser.getClientWindows, but shouldn't implementing this come first? browser.getClientWindows needs the getClientWindowState.

(In reply to Dan from comment #3)

I know this is in not is not directly blocking implementing browser.getClientWindows, but shouldn't implementing this come first? browser.getClientWindows needs the getClientWindowState.

Okay, I looked at the dependency graph again, and this issue is dependent on browser.getClientWindows. browser.getClientWindows does need to return the current state of the client window as part of its return object. So I am not sure if setting it should come first.

Whiteboard: [webdriver:m13] → [webdriver:m14]
Whiteboard: [webdriver:m14] → [webdriver:m15]
Assignee: nobody → temidayoazeez032
Status: NEW → ASSIGNED
Attachment #9445471 - Attachment description: Bug 1855028 - [wdspec] Implement "browser.setClientWindowState" command tests.?whimboo → Bug 1855028 - [wdspec] Implement "browser.setClientWindowState" command tests.r?whimboo
Attachment #9445471 - Attachment description: Bug 1855028 - [wdspec] Implement "browser.setClientWindowState" command tests.r?whimboo → Bug 1855028 - [wdspec] Implement "browser.setClientWindowState" command tests. r?whimboo
Points: 5 → ---
Whiteboard: [webdriver:m15] → [webdriver:m15][webdriver:external]

Comment on attachment 9445393 [details]
Bug 1855028 - Migrated GeckoDriver window methods to Window Manager. r?whimboo

Revision D233020 was moved to bug 1942849. Setting attachment 9445393 [details] to obsolete.

Attachment #9445393 - Attachment is obsolete: true
Depends on: 1942849
Whiteboard: [webdriver:m15][webdriver:external] → [webdriver:m16][webdriver:external]
Attachment #9488492 - Attachment is obsolete: true

No update for > 1 month, maybe should be moved to backlog for now.

Whiteboard: [webdriver:m16][webdriver:external] → [webdriver:m17][webdriver:external]

Sorry that is my fault. I didn't notice that the revision, that we are waiting for, was updated. I'll do the review.

Attachment #9444655 - Attachment description: Bug 1855028 - Implement "browser.setClientWindowState" command. r?whimboo → Bug 1855028 - [webdriver-bidi] Implement "browser.setClientWindowState" command.
Attachment #9445471 - Attachment description: Bug 1855028 - [wdspec] Implement "browser.setClientWindowState" command tests. r?whimboo → Bug 1855028 - [wdspec] Implement "browser.setClientWindowState" command tests.

I pushed a try build with the latest modifications but I still see quite a number of test failures across platforms:
https://treeherder.mozilla.org/jobs?repo=try&revision=84b8c7f0343094540cbd5aa7b45abcc1d69411ef

Here some things to ensure:

  1. We need metadata files for Android given that all these tests cannot be run and need to be disabled for that platform
  2. Transitions between states seem to be fragile - especially minimized to fullscreen seems to fail a lot
  3. We probably want to run each test in a new window that we can close at the end of the test to not affect the following tests
  4. We need special handling of assertions for Wayland given that we cannot move the window

Dan, are you still interested to continue working on this bug? I'll make sure to more promptly reply, and in case I miss something you can always ping me on Matrix. Please let us know. Thanks.

Flags: needinfo?(temidayoazeez032)

Hi Henrik. Yes, I am still interested in working on the bug.

Flags: needinfo?(temidayoazeez032)

Dan: I'm removing it from the milestone because we don't have to track contributions as milestone bugs, but this has no impact on the priority. Feel free to keep working on this and thanks again for your help on this bug!

Whiteboard: [webdriver:m17][webdriver:external] → [webdriver:backlog][webdriver:external]
Attachment #9445471 - Attachment description: Bug 1855028 - [wdspec] Implement "browser.setClientWindowState" command tests. → Bug 1855028 - [wdspec] Implement "browser.setClientWindowState" command tests. r?whimboo

Hi Dan, I want to check if you may have an update for us regarding this implementation. If you don't have the time please give us a note and someone can take over the remaining work. Thanks!

Flags: needinfo?(temidayoazeez032)

Hi Dan. I assume that you may not find the time to update this patch. Are you ok when one of us is taking over the remaining work? Thanks for the contribution so far!

Dan, I think that we can pick-up the remaining work to finally get this API landed. For that work we expect 3 points and we could do it in the next milestone starting in October.

Points: --- → 2
Priority: P2 → P3
Whiteboard: [webdriver:backlog][webdriver:external] → [webdriver:m18][webdriver:external]
Assignee: temidayoazeez032 → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(temidayoazeez032)

Liam will take a look at finishing up the patches. Thanks!

Assignee: nobody → ldebeasi
Mentor: hskupin
Status: NEW → ASSIGNED

Hey there,

I'm working on getting the tests for this passing. I'm using the work from the previous contributor as a starting point since that has already received reviews from you. Can you clarify the intent behind the stress.py tests? I'd like to better understand what part of the implementation this is testing.

Flags: needinfo?(hskupin)

Great and that's a good starting point!

Regarding the stress tests.... in the past we had issues with the stability of the window resizing methods and especially when you change between different modes and sizes side effects were shown. As such we are trying to stress-test Firefox to see that the way how we implemented the related API works as expected. The tests were already present for the WebDriver classic tests and were just ported over.

Flags: needinfo?(hskupin)
Points: 2 → ---
Depends on: 2002949
Whiteboard: [webdriver:m18][webdriver:external] → [webdriver:m19][webdriver:external]
Attachment #9525224 - Attachment description: Bug 1855028 - Implement browser.setClientWindowState command r=whimboo → Bug 1855028 - [webdriver-bidi] Add the "browser.setClientWindowState" command.

We cannot directly transition from the minimized to the fullscreen state and need to restore the window first if minimized. There is https://github.com/w3c/webdriver-bidi/issues/1035 on file for it.

I've created https://github.com/w3c/webdriver-bidi/pull/1063 to fix the transition issue.

Attachment #9445471 - Attachment is obsolete: true
Attachment #9444655 - Attachment is obsolete: true

As discussed with Liam I'm going to fix the remaining issue so that we can get this API landed soon. For the remaining work we agreed on 2 points.

Assignee: ldebeasi → hskupin
Mentor: hskupin
Points: --- → 2
Whiteboard: [webdriver:m19][webdriver:external] → [webdriver:m19]
Depends on: 2011471

I just noticed that the WebDriver tests need to be updated so that we use Javascript to get the actual window state. Right now we only rely on the values as returned by the command, which doesn't mean it's true.

(In reply to Henrik Skupin [:whimboo][⌚️UTC+1] from comment #26)

I just noticed that the WebDriver tests need to be updated so that we use Javascript to get the actual window state. Right now we only rely on the values as returned by the command, which doesn't mean it's true.

Actually there’s no way to retrieve the actual OS-level window state via a web API, so we can’t add those checks; at least not in the public tests. However, I can add Mozilla-specific tests that obtain the window state via chrome JS.

Otherwise I noticed a discrepancy in the current BiDi spec between OS-level fullscreen and document fullscreen. Right now, BiDi is using document fullscreen, which is not equivalent to the OS-level fullscreen window state. Since this command is intended to modify the OS-level window state, I’m not sure why the document fullscreen API was chosen. It seems like this should be changed.

Lets get this discussed in our next triage meeting.

Whiteboard: [webdriver:m19] → [webdriver:m19][webdriver:triage]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: