Closed Bug 1460059 Opened 6 years ago Closed 6 years ago

Intermittent /webdriver/tests/set_window_rect/resizing_and_positioning.py | test_window_resize - assert (400, 500) == (500, 600)

Categories

(Remote Protocol :: Marionette, defect, P2)

Version 3
defect

Tracking

(firefox62 fixed)

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: whimboo)

Details

(Keywords: intermittent-failure, Whiteboard: [retriggered][wptsync upstream])

Attachments

(1 file)

Filed by: apavel [at] mozilla.com

https://treeherder.mozilla.org/logviewer.html#?job_id=177546084&repo=autoland

https://queue.taskcluster.net/v1/task/MNpCKJfzSNK4vbRP-M5oyw/runs/0/artifacts/public/logs/live_backing.log

[task 2018-05-08T20:57:59.355Z] 20:57:59     INFO - STDOUT:     def test_window_resize(session):
[task 2018-05-08T20:57:59.355Z] 20:57:59     INFO - STDOUT:         if not window_size_supported(session):
[task 2018-05-08T20:57:59.356Z] 20:57:59     INFO - PID 16377 | 1525813079343	webdriver::server	DEBUG	<- 200 OK {"value": {}}
[task 2018-05-08T20:57:59.356Z] 20:57:59     INFO - STDOUT:             pytest.skip()
[task 2018-05-08T20:57:59.356Z] 20:57:59     INFO - STDOUT:     
[task 2018-05-08T20:57:59.356Z] 20:57:59     INFO - STDOUT:         # setting the window size by webdriver is synchronous
[task 2018-05-08T20:57:59.357Z] 20:57:59     INFO - STDOUT:         # so we should see the results immediately
[task 2018-05-08T20:57:59.357Z] 20:57:59     INFO - STDOUT:     
[task 2018-05-08T20:57:59.357Z] 20:57:59     INFO - STDOUT:         session.window.size = (400, 500)
[task 2018-05-08T20:57:59.358Z] 20:57:59     INFO - STDOUT:         assert session.window.size == (400, 500)
[task 2018-05-08T20:57:59.358Z] 20:57:59     INFO - STDOUT:     
[task 2018-05-08T20:57:59.358Z] 20:57:59     INFO - STDOUT:         session.window.size = (500, 600)
[task 2018-05-08T20:57:59.358Z] 20:57:59     INFO - STDOUT: >       assert session.window.size == (500, 600)
[task 2018-05-08T20:57:59.359Z] 20:57:59     INFO - STDOUT: E       assert (400, 500) == (500, 600)
[task 2018-05-08T20:57:59.359Z] 20:57:59     INFO - STDOUT: E         At index 0 diff: 400 != 500
[task 2018-05-08T20:57:59.359Z] 20:57:59     INFO - STDOUT: E         Full diff:
[task 2018-05-08T20:57:59.359Z] 20:57:59     INFO - STDOUT: E         - (400, 500)
[task 2018-05-08T20:57:59.360Z] 20:57:59     INFO - STDOUT: E         ?  ^    ^
[task 2018-05-08T20:57:59.360Z] 20:57:59     INFO - STDOUT: E         + (500, 600)
[task 2018-05-08T20:57:59.360Z] 20:57:59     INFO - STDOUT: E         ?  ^    ^
[task 2018-05-08T20:57:59.361Z] 20:57:59     INFO - STDOUT: session    = <Session 20f8272a-fff0-408e-8563-6f23121fd653>
[task 2018-05-08T20:57:59.361Z] 20:57:59     INFO - STDOUT: tests/web-platform/tests/webdriver/tests/set_window_rect/resizing_and_positioning.py
[task 2018-05-08T20:57:59.361Z] 20:57:59     INFO - STDOUT: :34: AssertionError
[task 2018-05-08T20:57:59.361Z] 20:57:59     INFO - STDOUT: =============================== warnings summary ===============================
[task 2018-05-08T20:57:59.362Z] 20:57:59     INFO - STDOUT: None
[task 2018-05-08T20:57:59.362Z] 20:57:59     INFO - STDOUT:   Module already imported so cannot be rewritten: mozlog
[task 2018-05-08T20:57:59.362Z] 20:57:59     INFO - STDOUT: -- Docs: http://doc.pytest.org/en/latest/warnings.html
[task 2018-05-08T20:57:59.362Z] 20:57:59     INFO - STDOUT: ===================== 1 failed, 1 warnings in 4.81 seconds =====================
[task 2018-05-08T20:57:59.391Z] 20:57:59     INFO - 
[task 2018-05-08T20:57:59.391Z] 20:57:59     INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/set_window_rect/resizing_and_positioning.py | test_window_resize - assert (400, 500) == (500, 600)
[task 2018-05-08T20:57:59.391Z] 20:57:59     INFO - session = <Session 20f8272a-fff0-408e-8563-6f23121fd653>
[task 2018-05-08T20:57:59.391Z] 20:57:59     INFO - 
[task 2018-05-08T20:57:59.392Z] 20:57:59     INFO -     def test_window_resize(session):
[task 2018-05-08T20:57:59.392Z] 20:57:59     INFO -         if not window_size_supported(session):
[task 2018-05-08T20:57:59.393Z] 20:57:59     INFO -             pytest.skip()
[task 2018-05-08T20:57:59.393Z] 20:57:59     INFO -     
[task 2018-05-08T20:57:59.393Z] 20:57:59     INFO -         # setting the window size by webdriver is synchronous
[task 2018-05-08T20:57:59.393Z] 20:57:59     INFO -         # so we should see the results immediately
[task 2018-05-08T20:57:59.394Z] 20:57:59     INFO -     
[task 2018-05-08T20:57:59.394Z] 20:57:59     INFO -         session.window.size = (400, 500)
[task 2018-05-08T20:57:59.394Z] 20:57:59     INFO -         assert session.window.size == (400, 500)
[task 2018-05-08T20:57:59.395Z] 20:57:59     INFO -     
[task 2018-05-08T20:57:59.395Z] 20:57:59     INFO -         session.window.size = (500, 600)
[task 2018-05-08T20:57:59.396Z] 20:57:59     INFO - >       assert session.window.size == (500, 600)
[task 2018-05-08T20:57:59.396Z] 20:57:59     INFO - E       assert (400, 500) == (500, 600)
[task 2018-05-08T20:57:59.397Z] 20:57:59     INFO - E         At index 0 diff: 400 != 500
[task 2018-05-08T20:57:59.397Z] 20:57:59     INFO - E         Full diff:
[task 2018-05-08T20:57:59.397Z] 20:57:59     INFO - E         - (400, 500)
[task 2018-05-08T20:57:59.398Z] 20:57:59     INFO - E         ?  ^    ^
[task 2018-05-08T20:57:59.398Z] 20:57:59     INFO - E         + (500, 600)
[task 2018-05-08T20:57:59.398Z] 20:57:59     INFO - E         ?  ^    ^
[task 2018-05-08T20:57:59.398Z] 20:57:59     INFO - 
[task 2018-05-08T20:57:59.399Z] 20:57:59     INFO - session    = <Session 20f8272a-fff0-408e-8563-6f23121fd653>
[task 2018-05-08T20:57:59.399Z] 20:57:59     INFO - 
[task 2018-05-08T20:57:59.399Z] 20:57:59     INFO - tests/web-platform/tests/webdriver/tests/set_window_rect/resizing_and_positioning.py:34: AssertionError
[task 2018-05-08T20:57:59.400Z] 20:57:59     INFO - TEST-OK | /webdriver/tests/set_window_rect/resizing_and_positioning.py | took 5053ms
[task 2018-05-08T20:57:59.422Z] 20:57:59  WARNING - u'runner_teardown': ()
[task 2018-05-08T20:57:59.424Z] 20:57:59     INFO - Starting runner
[task 2018-05-08T20:57:59.445Z] 20:57:59     INFO - PID 16542 | 1525813079442	geckodriver	INFO	geckodriver 0.20.1 ( '3b84be9ee9e6'  '2018-05-07 15:05 -0700')
[task 2018-05-08T20:57:59.445Z] 20:57:59     INFO - PID 16542 | 1525813079443	webdriver::httpapi	DEBUG	Creating routes
[task 2018-05-08T20:57:59.453Z] 20:57:59     INFO - PID 16542 | 1525813079446	geckodriver	INFO	Listening on 127.0.0.1:4446
[task 2018-05-08T20:57:59.945Z] 20:57:59     INFO - WebDriver HTTP server listening at http://127.0.0.1:4446/
By the WebDriver specification Set Window Rect should return the current size but not the requested one:

> Return success with the JSON serialization of the current top-level browsing context’s window rect. 

But we return the requested size:

[task 2018-05-08T20:57:57.077Z] 20:57:57     INFO - PID 16377 | 1525813077068	geckodriver::marionette	TRACE	-> 76:[0,4,"WebDriver:SetWindowRect",{"height":600,"width":500,"x":null,"y":null}]
[task 2018-05-08T20:57:57.079Z] 20:57:57     INFO - PID 16377 | 1525813077071	Marionette	TRACE	0 -> [0,4,"WebDriver:SetWindowRect",{"height":600,"width":500,"x":null,"y":null}]
[task 2018-05-08T20:57:57.140Z] 20:57:57     INFO - PID 16377 | 1525813077132	Marionette	TRACE	0 <- [1,4,null,{"x":0,"y":0,"width":500,"height":600,"state":"normal"}]
[task 2018-05-08T20:57:57.142Z] 20:57:57     INFO - PID 16377 | 1525813077133	geckodriver::marionette	TRACE	<- [1,4,null,{"x":0,"y":0,"width":500,"height":600,"state":"normal"}]
[task 2018-05-08T20:57:57.143Z] 20:57:57     INFO - PID 16377 | 1525813077133	webdriver::server	DEBUG	<- 200 OK {"value": {"height":600,"width":500,"x":0,"y":0}}
[task 2018-05-08T20:57:57.144Z] 20:57:57     INFO - PID 16377 | 1525813077135	webdriver::server	DEBUG	-> GET /session/20f8272a-fff0-408e-8563-6f23121fd653/window/rect
[task 2018-05-08T20:57:57.145Z] 20:57:57     INFO - PID 16377 | 1525813077136	geckodriver::marionette	TRACE	-> 34:[0,5,"WebDriver:GetWindowRect",{}]
[task 2018-05-08T20:57:57.167Z] 20:57:57     INFO - PID 16377 | 1525813077161	Marionette	TRACE	0 -> [0,5,"WebDriver:GetWindowRect",{}]
[task 2018-05-08T20:57:57.168Z] 20:57:57     INFO - PID 16377 | 1525813077163	Marionette	TRACE	0 <- [1,5,null,{"x":0,"y":0,"width":400,"height":500,"state":"normal"}]
[task 2018-05-08T20:57:57.175Z] 20:57:57     INFO - PID 16377 | 1525813077165	geckodriver::marionette	TRACE	<- [1,5,null,{"x":0,"y":0,"width":400,"height":500,"state":"normal"}]
[task 2018-05-08T20:57:57.177Z] 20:57:57     INFO - PID 16377 | 1525813077165	webdriver::server	DEBUG	<- 200 OK {"value": {"height":500,"width":400,"x":0,"y":0}}

Andreas, can you fix that or mentor this bug?
Flags: needinfo?(ato)
Maybe we need a new bug filed, if we cannot stabilize the test.
We are returning the current size, but WebDriver:SetWindowRect ıs
occasionally racy and I haven’t been able to figure out how to fix
that.
Flags: needinfo?(ato)
Correct, because this patch refactored the folder structure of the tests. As such this specific file has been moved from the `contexts` sub-folder to `set_window_rect` sub-folder. At this point we might have a different pre-condition for the test, which means that the window size is different as from before the refactoring. Which could cause a problem like that.
Flags: needinfo?(hskupin)
Hm, we have resizing covered completely under set.py, so not sure if we need this file at all anymore. The negative tests might be of interest. Also note that the test is using `session.window.size` to resize the window, and not a custom helper method as what we use in all the other tests.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: P5 → P2
Attachment #8974983 - Flags: review?(ato)
Comment on attachment 8974983 [details]
Bug 1460059 - [wdspec] Remove superfluous set_window_rect/resizing_and_positioning.py.

https://reviewboard.mozilla.org/r/243372/#review249456
Attachment #8974983 - Flags: review?(ato) → review+
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5cbb1c6750d1
[wdspec] Remove superfluous set_window_rect/resizing_and_positioning.py. r=ato
Created web-platform-tests PR https://github.com/w3c/web-platform-tests/pull/10974 for changes under testing/web-platform/tests
Whiteboard: [retriggered] → [retriggered][wptsync upstream]
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
https://hg.mozilla.org/mozilla-central/rev/5cbb1c6750d1
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Moving bug to Remote Protocol::Marionette component per bug 1815831.
Component: geckodriver → Marionette
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: