Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Adjust window test to not assumed unmaximized #6554

Closed
bbondy opened this issue Jan 6, 2017 · 2 comments
Closed

Adjust window test to not assumed unmaximized #6554

bbondy opened this issue Jan 6, 2017 · 2 comments

Comments

@bbondy
Copy link
Member

bbondy commented Jan 6, 2017

Steps to reproduce:

  1. Open up browser console with Shift+F8
  2. chrome.remote.getCurrentWindow().setSize(122, 122)
    And you'll see it doesn't resize.

Or alternative steps to reproduce:
npm run test -- --grep="offsets from the focused window"
And you'll see it fails, you'll have to remove the this.skip from the test first though.

Note this works in .12.15 but you have to use this code:
require('electron').remote.getCurrentWindow().setSize(122, 122)

Once fixed please re-enable the test.

/cc @posix4e, would you mind taking a look since this is introduced in .13?

@bbondy bbondy added this to the 0.13.0 milestone Jan 6, 2017
@bbondy
Copy link
Member Author

bbondy commented Jan 6, 2017

It was tested on Ubuntu 16.04.1 LTS

@bbondy
Copy link
Member Author

bbondy commented Jan 15, 2017

This turned out not to be only a problem in the tests. Ubuntu maximizes windows by default when they run so the resize wouldn't work in a maximized state. The fix is just to unmaximize in tests before doing the resize.

@bbondy bbondy changed the title window.setSize not working on linux Adjust window test to not assumed unmaximized Jan 16, 2017
bbondy added a commit that referenced this issue Jan 16, 2017
Ubuntu maximizes applications by default on first run.  Tests should not assume window is not maximized. Resizes don't work when a window is maximized.

Fix #6554

more logging-2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants