"WebDriver:SetWindowRect" throws invalid TimeoutError if window is resized to a not reachable dimension
Categories
(Remote Protocol :: Marionette, defect, P1)
Tracking
(firefox65 fixed, firefox66 fixed)
People
(Reporter: ato, Assigned: whimboo)
References
(Blocks 1 open bug, )
Details
(Keywords: regression)
Attachments
(3 files)
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 4•6 years ago
|
||
We have to fix this for the Firefox 65 release, otherwise we will get a lot of complains from users because of those timeout errors.
Assignee | ||
Comment 5•6 years ago
|
||
Throwing the timeout will actually be fixed by bug 1515867. But running into it which causes a delay similar to minimize window, I will pick up afterward.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 6•6 years ago
|
||
Sorry for the back and forth but we decided to fix this for real and not to get away with the timeout error only.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 7•6 years ago
|
||
I reproduced this now by trying to set a dimension of 100x100 twice for the browser window. Whereby the absolute minimal size can be width=335px, height=121px on my system. As such we are trying to resize but never get a resize event. As such the DebounceCallback never gets run, and early exits.
Maybe we need a maximum expected time until the first event should actually happen. And if that is not the case bail out.
Assignee | ||
Comment 8•6 years ago
|
||
Ok, so if you call win.resizeTo()
the resize operation will be done in a single step. As such only a single resize
event is being fired. That means we clearly don't need the debounceCallback
method here.
Further and similar to win.moveTo()
the function returns when the operation has been done. As such we should be able to even get rid of using the TimedPromise
. We should only use the IdlePromise
to allow the resize
event to be fired.
Here how it looks like when resizing to a new dimension:
1547219997180 Marionette DEBUG 3 -> [0,15,"WebDriver:SetWindowRect",{"y":null,"x":null,"width":335,"height":100}]
** before resizeTo
** before IdlePromise
** resize event
** after IdlePromise
1547219997317 Marionette DEBUG 3 <- [1,15,null,{"x":48,"y":23,"width":335,"height":121}]
Assignee | ||
Comment 9•6 years ago
|
||
With the upcoming patch we will also have a huge performance improvement. I run the Mn unit test test_window_rect.py 10 times, and here is the output:
before: 24.85s user 6.69s system 43% cpu 1:12.92 total
after: 24.83s user 6.70s system 69% cpu 45.294 total
As visible we are way better utilizing the CPU, and as such it is ~38% faster.
Assignee | ||
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
Assignee | ||
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/602e8cefc900
https://hg.mozilla.org/mozilla-central/rev/d4a75d417b03
https://hg.mozilla.org/mozilla-central/rev/3ef29704bc3d
Assignee | ||
Comment 16•6 years ago
|
||
This is a test-only regression for Firefox 65. Please uplift to mozilla-beta.
Comment 17•6 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/2d63cb7c2ccc
https://hg.mozilla.org/releases/mozilla-beta/rev/c52783e0d7e1
https://hg.mozilla.org/releases/mozilla-beta/rev/c3a3d5aadad2
Assignee | ||
Updated•6 years ago
|
Updated•2 years ago
|
Description
•