Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow height and width to be given to allow responsive testing #30

Open
jamescookie opened this issue Mar 24, 2015 · 0 comments
Open

Allow height and width to be given to allow responsive testing #30

jamescookie opened this issue Mar 24, 2015 · 0 comments

Comments

@jamescookie
Copy link

Both PhantomJS and Chrome allow you to give the initial dimensions of the browser to allow responsive testing, but not firefox.

I thought it would be trivial but it turns out not to be simple.

Modifying this line to the following should work, but doesn't?

self._execCommand(command, [url, '-profile', self._tempDir, '-no-remote -width 335 -height 670']);

This is what I did get working, but it's not pretty - Add the following before this line:

fs.writeFileSync(self._tempDir + '/xulstore.json', '{"chrome://browser/content/browser.xul":{"main-window":{"width":"335","height":"670"}}}');

Obviously, the height and width should be passed in (I was just tinkering to try to get it to work)

Maybe something else altogether?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant