Open Bug 1600389 Opened 5 years ago Updated 1 year ago

ubuntu1804 - testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py TestWindowRect.test_move_to_negative_coordinates | AssertionError: 27 not less than or equal to 0

Categories

(Testing :: Marionette Client and Harness, defect, P5)

Version 3
defect

Tracking

(Not tracked)

People

(Reporter: intermittent-bug-filer, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 obsolete file)

Filed by: egao [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer.html#?job_id=278675918&repo=try
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Mh3PWT17R2SNrsdwmqmPpg/runs/0/artifacts/public/logs/live_backing.log


suite: marionette

context:
[task 2019-11-28T21:12:54.517Z] 21:12:54 INFO - TEST-UNEXPECTED-FAIL | testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py TestWindowRect.test_move_to_negative_coordinates | AssertionError: 27 not less than or equal to 0
[task 2019-11-28T21:12:54.517Z] 21:12:54 INFO - Traceback (most recent call last):
[task 2019-11-28T21:12:54.517Z] 21:12:54 INFO - File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_harness/marionette_test/testcases.py", line 159, in run
[task 2019-11-28T21:12:54.517Z] 21:12:54 INFO - testMethod()
[task 2019-11-28T21:12:54.517Z] 21:12:54 INFO - File "/builds/worker/workspace/build/tests/marionette/tests/testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py", line 184, in test_move_to_negative_coordinates
[task 2019-11-28T21:12:54.517Z] 21:12:54 INFO - self.assertLessEqual(new_position["y"], 0)
[task 2019-11-28T21:12:54.517Z] 21:12:54 INFO - TEST-INFO took 77ms

I wonder if this test is failing due to slightly different chrome sizing applied by the GNOME3 theme in ubuntu1804 versus the outgoing Unity theme in ubuntu1604.

:automatedtester - would whimboo be the appropriate contact here for this bug?

Flags: needinfo?(dburns)

Edwin, does Ubuntu 18.04 have a global navigation bar at the top? Looks like that, and that it is 27px high.

Flags: needinfo?(dburns) → needinfo?(egao)

A more relevant portion of the logs:

[task 2019-11-28T21:12:54.416Z] 21:12:54     INFO - TEST-START | testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py TestWindowRect.test_move_to_negative_coordinates
[task 2019-11-28T21:12:54.418Z] 21:12:54     INFO -  1574975574416	Marionette	DEBUG	Closed connection 80
[task 2019-11-28T21:12:54.418Z] 21:12:54     INFO -  1574975574416	Marionette	DEBUG	Accepted connection 81 from 127.0.0.1:45726
[task 2019-11-28T21:12:54.419Z] 21:12:54     INFO -  1574975574417	Marionette	DEBUG	81 -> [0,1,"WebDriver:NewSession",{"strictFileInteractability":true}]
[task 2019-11-28T21:12:54.420Z] 21:12:54     INFO -  1574975574418	Marionette	TRACE	[128] Frame script loaded
[task 2019-11-28T21:12:54.423Z] 21:12:54     INFO -  1574975574420	Marionette	TRACE	[128] Frame script registered
[task 2019-11-28T21:12:54.424Z] 21:12:54     INFO -  1574975574421	Marionette	DEBUG	81 <- [1,1,null,{"sessionId":"e1db0b9d-da5e-461e-bd5b-c3d437fb56e1","capabilities":{"browserName":"firefox","browserVersion":"72.0a ... mp/tmpMPKcmX.mozrunner","moz:shutdownTimeout":60000,"moz:useNonSpecCompliantPointerOrigin":false,"moz:webdriverClick":true}}]
[task 2019-11-28T21:12:54.424Z] 21:12:54     INFO -  1574975574421	Marionette	DEBUG	81 -> [0,2,"WebDriver:SetTimeouts",{"script":30000}]
[task 2019-11-28T21:12:54.424Z] 21:12:54     INFO -  1574975574421	Marionette	DEBUG	81 <- [1,2,null,{"value":null}]
[task 2019-11-28T21:12:54.425Z] 21:12:54     INFO -  1574975574422	Marionette	DEBUG	81 -> [0,3,"WebDriver:SetTimeouts",{"pageLoad":300000}]
[task 2019-11-28T21:12:54.425Z] 21:12:54     INFO -  1574975574422	Marionette	DEBUG	81 <- [1,3,null,{"value":null}]
[task 2019-11-28T21:12:54.427Z] 21:12:54     INFO -  1574975574423	Marionette	DEBUG	81 -> [0,4,"WebDriver:SetTimeouts",{"implicit":0}]
[task 2019-11-28T21:12:54.428Z] 21:12:54     INFO -  1574975574423	Marionette	DEBUG	81 <- [1,4,null,{"value":null}]
[task 2019-11-28T21:12:54.428Z] 21:12:54     INFO -  1574975574426	Marionette	DEBUG	81 -> [0,5,"WebDriver:GetWindowRect",{}]
[task 2019-11-28T21:12:54.428Z] 21:12:54     INFO -  1574975574426	Marionette	DEBUG	81 <- [1,5,null,{"x":0,"y":27,"width":1280,"height":1040}]
[task 2019-11-28T21:12:54.430Z] 21:12:54     INFO -  1574975574427	Marionette	DEBUG	81 -> [0,6,"WebDriver:ExecuteScript",{"script":"return {\n              width: window.screen.availWidth,\n              height: win ... [],"filename":"tests/testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py","sandbox":null,"line":22}]
[task 2019-11-28T21:12:54.433Z] 21:12:54     INFO -  1574975574430	Marionette	DEBUG	81 <- [1,6,null,{"value":{"width":1600,"height":1173}}]
[task 2019-11-28T21:12:54.434Z] 21:12:54     INFO -  1574975574431	Marionette	DEBUG	81 -> [0,7,"WebDriver:SetWindowRect",{"y":null,"x":null,"width":1280,"height":1040}]
[task 2019-11-28T21:12:54.435Z] 21:12:54     INFO -  1574975574432	Marionette	DEBUG	81 <- [1,7,null,{"x":0,"y":27,"width":1280,"height":1040}]
[task 2019-11-28T21:12:54.435Z] 21:12:54     INFO -  1574975574432	Marionette	DEBUG	81 -> [0,8,"WebDriver:GetWindowRect",{}]
[task 2019-11-28T21:12:54.436Z] 21:12:54     INFO -  Current position: 0
[task 2019-11-28T21:12:54.436Z] 21:12:54     INFO -  1574975574433	Marionette	DEBUG	81 <- [1,8,null,{"x":0,"y":27,"width":1280,"height":1040}]
[task 2019-11-28T21:12:54.437Z] 21:12:54     INFO -  1574975574433	Marionette	DEBUG	81 -> [0,9,"WebDriver:SetWindowRect",{"y":-8,"x":-8,"width":null,"height":null}]
[task 2019-11-28T21:12:54.438Z] 21:12:54     INFO -  Position after requesting move to negative coordinates: 0, 27
[task 2019-11-28T21:12:54.439Z] 21:12:54     INFO -  1574975574438	Marionette	DEBUG	81 <- [1,9,null,{"x":0,"y":27,"width":1280,"height":1040}]
[task 2019-11-28T21:12:54.442Z] 21:12:54     INFO -  1574975574439	Marionette	DEBUG	81 -> [0,10,"Marionette:GetContext",{}]
[task 2019-11-28T21:12:54.442Z] 21:12:54     INFO -  1574975574440	Marionette	DEBUG	81 <- [1,10,null,{"value":"content"}]
[task 2019-11-28T21:12:54.443Z] 21:12:54     INFO -  1574975574440	Marionette	DEBUG	81 -> [0,11,"Marionette:SetContext",{"value":"chrome"}]
[task 2019-11-28T21:12:54.443Z] 21:12:54     INFO -  1574975574440	Marionette	DEBUG	81 <- [1,11,null,{"value":null}]
[task 2019-11-28T21:12:54.443Z] 21:12:54     INFO -  1574975574441	Marionette	DEBUG	81 -> [0,12,"WebDriver:TakeScreenshot",{"full":true,"hash":false,"id":null,"scroll":true}]
[task 2019-11-28T21:12:54.488Z] 21:12:54     INFO -  1574975574483	Marionette	DEBUG	81 <- [1,12,null,{"value":"iVBORw0KGgoAAAANSUhEUgAABQAAAAQQCAYAAAC9RfbYAAAgAElEQVR4nOzdf5Dcd33fcf/Rmf7fTtOZtkkz08mk+VGSNAkt4CaIEKaj ... AAAAAAjAlAAAAAABgTgAAAAAAwJgABAAAAYEwAAgAAAMCYAAQAAACAMQEIAAAAAGMCEAAAAADGBCAAAAAAjAlAAAAAABgLnLkP43UZqucAAAAASUVORK5CYII="}]
[task 2019-11-28T21:12:54.489Z] 21:12:54     INFO -  1574975574485	Marionette	DEBUG	81 -> [0,13,"Marionette:SetContext",{"value":"content"}]
[task 2019-11-28T21:12:54.489Z] 21:12:54     INFO -  1574975574485	Marionette	DEBUG	81 <- [1,13,null,{"value":null}]
[task 2019-11-28T21:12:54.490Z] 21:12:54     INFO -  1574975574486	Marionette	DEBUG	81 -> [0,14,"Marionette:GetContext",{}]
[task 2019-11-28T21:12:54.491Z] 21:12:54     INFO -  1574975574486	Marionette	DEBUG	81 <- [1,14,null,{"value":"content"}]
[task 2019-11-28T21:12:54.492Z] 21:12:54     INFO -  1574975574486	Marionette	DEBUG	81 -> [0,15,"Marionette:SetContext",{"value":"content"}]
[task 2019-11-28T21:12:54.493Z] 21:12:54     INFO -  1574975574486	Marionette	DEBUG	81 <- [1,15,null,{"value":null}]
[task 2019-11-28T21:12:54.494Z] 21:12:54     INFO -  1574975574487	Marionette	DEBUG	81 -> [0,16,"WebDriver:GetPageSource",{}]
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO - TEST-UNEXPECTED-FAIL | testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py TestWindowRect.test_move_to_negative_coordinates | AssertionError: 27 not less than or equal to 0
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO - Traceback (most recent call last):
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_harness/marionette_test/testcases.py", line 159, in run
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -     testMethod()
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -   File "/builds/worker/workspace/build/tests/marionette/tests/testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py", line 184, in test_move_to_negative_coordinates
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -     self.assertLessEqual(new_position["y"], 0)
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO - TEST-INFO took 77ms
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -  1574975574490	Marionette	DEBUG	81 <- [1,16,null,{"value":"<html><head></head><body></body></html>"}]
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -  1574975574491	Marionette	DEBUG	81 -> [0,17,"Marionette:SetContext",{"value":"content"}]
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -  1574975574492	Marionette	DEBUG	81 <- [1,17,null,{"value":null}]
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -  1574975574495	Marionette	DEBUG	81 -> [0,18,"WebDriver:SetWindowRect",{"y":27,"x":0,"width":1280,"height":1040}]
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -  1574975574496	Marionette	DEBUG	81 <- [1,18,null,{"x":0,"y":27,"width":1280,"height":1040}]
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -  1574975574497	Marionette	DEBUG	81 -> [0,19,"WebDriver:ExecuteScript",{"script":"return document.fullscreenElement;","newSandbox":true,"args":[],"filename":"tests/testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py","sandbox":null,"line":41}]
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -  1574975574500	Marionette	DEBUG	81 <- [1,19,null,{"value":null}]
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -  1574975574500	Marionette	DEBUG	81 -> [0,20,"WebDriver:DeleteSession",{}]
[task 2019-11-28T21:12:54.517Z] 21:12:54     INFO -  1574975574502	Marionette	DEBUG	81 <- [1,20,null,{"value":null}]

:whimboo - I believe the GNOME3 shell does have the top bar. I can try adjusting the expected values and see if that resolve the problem.

Flags: needinfo?(egao)

Changing the expected coordinate value to (0, 27) resolved that particular test's failure, but caused failure elsewhere.

I'm investigating if it is possible to turn off the top menu bar via either gsettings or some css values.

I'm trying to install the hide top bar extension by installing gnome-shell-extension-autohidetopbar. I'm not sure if this will work, but the try push is here: https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=d07a8d5d545af5d0d986eebb22e8315a6fd8cf26

It appears that my changes to install the tweak above, enable it via gsettings seems to have resolved all issues with the exception of one:

TEST-UNEXPECTED-FAIL | testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py TestWindowRect.test_resize_larger_than_screen | AssertionError: 1163 not greater than or equal to 1200

The difference 1163 from 1200 is 27 pixels, which is likely the top menu bar.

The tweak installed above has a sub-setting where users are able to configure the tweak. One of the option is 'hide the menu bar only if fullscreen' or something along those lines, and I suspect maybe that option needs to be toggled off (to have it hidden permanently).

Otherwise we might have to make use of https://developer.mozilla.org/en-US/docs/Web/API/Screen/availTop (and availLeft) to ensure to take possible system menu bars into account. It means the values could be negative or the minimum x or y value.

This issue can be resolved if I set the initial starting point of the window to x=50, y=50 as shown in this push:
https://treeherder.mozilla.org/#/jobs?repo=try&group_state=expanded&revision=d61125c9430c6a34431f4742ccae58486ae8d47c

Other resolution/window size related issues are not resolved however. Given that, do you think it would be preferable to look for an alternate solution that can address all failures instead of just the initial window position?

Assignee: nobody → egao
Status: NEW → ASSIGNED
Attachment #9131288 - Attachment description: Bug 1600389 - marionette test_move_to_negative_coordinates → Bug 1600389 - take top menu bar into account when determining the minimum screenY value in test_move_to_negative_coordinates
Attachment #9131288 - Attachment description: Bug 1600389 - take top menu bar into account when determining the minimum screenY value in test_move_to_negative_coordinates → Bug 1600389 - take top menu bar into account when determining the minimum screenY value in test_move_to_negative_coordinates on linux1804
Attachment #9131288 - Attachment is obsolete: true
Blocks: 1602701
No longer depends on: 1602701

Closing as Bug 1621483 has made this not applicable for the time being, since marionettte/wdspec test are now run on a compiz environment that is essentially carried over from the legacy ubuntu1604 environment.

For more information please see https://phabricator.services.mozilla.com/D65630#2029149,.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX

Lets not close it because it is still a problem especially for users running on Ubuntu.

Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Assignee: egao → nobody
Status: REOPENED → NEW
No longer blocks: 1602701
Depends on: 1602701
Severity: normal → S3
Product: Testing → Remote Protocol
Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: