Closed Bug 1364594 Opened 7 years ago Closed 7 years ago

Set Window Rect doesnt come out of fullscreen if browser in fullscreen mode

Categories

(Remote Protocol :: Marionette, enhancement)

Version 3
enhancement
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: automatedtester, Assigned: automatedtester)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 3 obsolete files)

When working on bug 1364389 I have found we miss step 10 in set window rect.

This bug is to get that fixed.
Comment on attachment 8867701 [details]
Bug 1364594: Exit fullscreen when Set Window Rect is invoked.

https://reviewboard.mozilla.org/r/139278/#review142586

Mostly nits, but for some reason I don’t understand, some other tests are now failing on Windows 10.

::: commit-message-b38af:1
(Diff revision 1)
> +Bug 1364594: Exit fullscreen when Set Window Rect called. r?ato

Fix prose here.

::: commit-message-b38af:3
(Diff revision 1)
> +Bug 1364594: Exit fullscreen when Set Window Rect called. r?ato
> +
> +If the browser is in fullscreen mode and set window rect is called

s/set window rect/Set Window Rect/

::: commit-message-b38af:7
(Diff revision 1)
> +
> +If the browser is in fullscreen mode and set window rect is called
> +we need to exit fullscreen mode and then continue to manipulate the
> +browser.
> +
> +https://w3c.github.io/webdriver/webdriver-spec.html#set-window-rect Step 10

“… as described in …”

::: testing/marionette/driver.js:1373
(Diff revision 1)
> +  if (win.windowState == win.STATE_FULLSCREEN){
> +    win.document.exitFullscreen();
> +  }

Add space before brace on :1373.

::: testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py:196
(Diff revision 1)
> +        result = self.marionette.set_window_rect(width=self.max['width'] - 100,
> +                                                 height=self.max["height"] - 100)

Use double quotes for consistency.
Attachment #8867701 - Flags: review?(ato) → review+
Attachment #8868104 - Attachment is obsolete: true
Pushed by dburns@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d58fda39820b
Exit fullscreen when Set Window Rect is invoked. r=ato
Backed out for failing Marionette's test_window_maximize.py TestWindowMaximize.test_maximize on Windows 8 x64:

https://hg.mozilla.org/integration/autoland/rev/1f09b8e255ddf965d62a2cc0086ce08ed5e86ea9

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=d58fda39820b7019e8364f033dab5183d939f678&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=99790548&repo=autoland

08:01:28     INFO -  TEST-START | test_window_maximize.py TestWindowMaximize.test_maximize
08:01:28    ERROR -  TEST-UNEXPECTED-FAIL | test_window_maximize.py TestWindowMaximize.test_maximize | AssertionError: Window height is not within 16 px of availHeight, current height 1200 and max height 1160
08:01:28     INFO -  Traceback (most recent call last):
08:01:28     INFO -    File "C:\slave\test\build\venv\lib\site-packages\marionette_harness\marionette_test\testcases.py", line 166, in run
08:01:28     INFO -      testMethod()
08:01:28     INFO -    File "C:\slave\test\build\tests\marionette\tests\testing\marionette\harness\marionette_harness\tests\unit\test_window_maximize.py", line 71, in test_maximize
08:01:28     INFO -      self.assert_window_maximized(size)
08:01:28     INFO -    File "C:\slave\test\build\tests\marionette\tests\testing\marionette\harness\marionette_harness\tests\unit\test_window_maximize.py", line 50, in assert_window_maximized
08:01:28     INFO -      .format(delta, actual["height"], self.max["height"]))
Flags: needinfo?(dburns)
Attachment #8868912 - Attachment is obsolete: true
Pushed by dburns@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/515c3f15cf30
Exit fullscreen when Set Window Rect is invoked. r=ato
Backed out for failing test_window_maximize.py TestWindowMaximize.test_maximize on Linux:

https://hg.mozilla.org/integration/autoland/rev/ae9d1af14c2481fc695461b4cd3fd488006acc84

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=515c3f15cf3069c7e14bc98773d6f0185281123d&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=100208765&repo=autoland

[task 2017-05-18T20:07:28.846601Z] 20:07:28     INFO - TEST-START | test_window_maximize.py TestWindowMaximize.test_maximize
[task 2017-05-18T20:07:29.266928Z] 20:07:29     INFO - TEST-UNEXPECTED-FAIL | test_window_maximize.py TestWindowMaximize.test_maximize | AssertionError: Window height is not within 8 px of availHeight, current height 1200 and max height 1192
[task 2017-05-18T20:07:29.268028Z] 20:07:29     INFO - Traceback (most recent call last):
[task 2017-05-18T20:07:29.268345Z] 20:07:29     INFO -   File "/home/worker/workspace/build/venv/local/lib/python2.7/site-packages/marionette_harness/marionette_test/testcases.py", line 166, in run
[task 2017-05-18T20:07:29.269203Z] 20:07:29     INFO -     testMethod()
[task 2017-05-18T20:07:29.270682Z] 20:07:29     INFO -   File "/home/worker/workspace/build/tests/marionette/tests/testing/marionette/harness/marionette_harness/tests/unit/test_window_maximize.py", line 69, in test_maximize
[task 2017-05-18T20:07:29.270740Z] 20:07:29     INFO -     self.assert_window_maximized(size)
[task 2017-05-18T20:07:29.271109Z] 20:07:29     INFO -   File "/home/worker/workspace/build/tests/marionette/tests/testing/marionette/harness/marionette_harness/tests/unit/test_window_maximize.py", line 48, in assert_window_maximized
[task 2017-05-18T20:07:29.271174Z] 20:07:29     INFO -     .format(delta, actual["height"], self.max["height"] - delta))
Attachment #8869583 - Attachment is obsolete: true
Pushed by dburns@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8cc336b9806d
Exit fullscreen when Set Window Rect is invoked. r=ato
fixed and landed
Flags: needinfo?(dburns)
Pushed by dburns@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/95dcd6da319f
Exit fullscreen when Set Window Rect is invoked. r=ato
https://hg.mozilla.org/mozilla-central/rev/95dcd6da319f
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Flags: needinfo?(dburns)
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: