I'm sure others have figured out how to emulate orientation in Chrome by now, but I came across this post and wanted to add instructions for anyone still looking for help.
It's actually rather simple.
These instructions are current as of
Chrome Stable 34.0.1847.131
From within Chrome Dev Tools (Inside Chrome, hit F12 to bring up Chrome Dev Tools) go to the Emulation tab.
Select the device you wish to emulate from the dropdownlist and hit Emulate.
When you Emulate, the "Screen" section that is in the stacked section list to the left of the Emulation tab gains a checkmark to indicate it is active. Select it.
In the Screen section, the resolution of the device you are emulating will be displayed in text input fields near the top. There is a "swap dimensions" button between them that will switch the width with the height, which in essence will switch your emulation from portrait to landscape.
Some other relevant things you can do inside Chrome Dev Tools' Emulator
You can:
- Emulate the Device pixel ratio
- Emulate CSS media types (braille,embossed,handheld,print,projection,screen,speech,tty,tv: See RFC 2534 and related documents for more specifics)
- Spoof user agent: you can have Chrome "impersonate" other browser engines.
- Emulate touch screen (It's not perfect, but it's a nice touch(<=rimshot))
- Emulate geolocation coordinates (including "position unavailable" emulation)
- Emulate Accelerometer
My Personal Tip for Development in Portrait Orientation
Assuming you have a 16:9 monitor, a rotating VESA stand, and drivers that support a change in orientation (you can find that out in Windows' Screen Resolution settings. If there's an "Orientation" dropdownlist, then you can rotate your view)
Physically rotate your screen, then rotate your display in Windows (you can also [Ctrl][Alt][Left Arrow] to rotate the display). Emulate a portrait orientation as I mentioned above and set the Device pixel ratio to 1. This will scale up your mobile device emulator to full screen size. It won't natively trigger a mobile layout without some additional help, but em based media queries will allow you to [Ctrl][+] to scale up Chrome's em value to trigger your mobile layout.
Using the Dev Tools emulation allows you to approximate a touch screen interface without a touch screen monitor.
It also allows you to have any sized 16:9 monitor display a "widescreen" mobile layout. Naturally, a 16:10 monitor would allow you to emulate 10:16 layouts without having to resize your browser
The one feature I really want to see Google add to this is the ability while emulating to have a "double tap" auto-resize the window. That's not currently supported.
alert(window.orientation);
in Chrome on Windows and it doesn't work. For development, could you not use different widths instead of orientations, then switch for the live version? – Barayon