Your comments

Thanks. This works exactly as advertised. At work this is beyond our present requirements, so I filed the issue more because I happened to notice it than due to a business need, but I have some personal projects in which, when I return to them (and if that's before the v.2 release) this will be a handy workaround. Looking forward to the new release!

I have a partial answer to this based on some further testing. The window is not, in fact, resized to 320 wide. By manually dragging the resize bar on the window, I can see for a particular site, the window and viewport can go no smaller than 372 pixels wide. I suspect what happens here is that when the dimensions go out of bounds, the resize operation fails completely and both width and height are set to minimum possible values.

The only thing I tried which proved fruitful was to switch to various different sites and observe the differences between window and viewport sizes on each. It turns out that different sites place different constraints on minimum window width and minimum viewport width, so the bug does not always occur -- it only happens on sites that prevent the viewport from being resized lower than the dimensions of the preset. I have no publicly accessible URL for the site I'm working on, so these tests were done with random URLs I frequently visit.

For, the minimum width is 372 for both window & viewport. For, the minimum viewport width is reported as 263 while the minimum window width is 394, so the 320x480 preset works fine there, whereas it doesn't for the first URL.

So perhaps this is all working as intended, but I think the user could be given some feedback, e.g. a passive bubble complaining about the failure and then do nothing, or else resize as small as possible within the site's constraints instead, and a passive notification of the same. Mysteriously resizing the window to zero dimensions is a rather surprising, and broken-looking result. If you could just make it fail in a less mysterious way, I'd be happy.



OK. I confirmed this also on Debian "jessie" 8.2, the latest Debian stable release, using chromium 46.0.2490.71-1~deb8u1. So just install that.