Recent versions of Firefox and Chrome (wisely) disallow websites from resizing the main browser window. This is awesome for browsing, but not so awesome for automated testing.
The solution, as Luke Inman-Semerau figured out, is that you have to open up a new browser window before using javascript to call window.resizeTo().
This works great for Firefox, but for Chrome, you need to specify the width and height of the browser in the options of the resizeTo call, otherwise Chrome will simply open a new tab.
This Ruby gist briefly demonstrates how to resize the window for different browsers.