You must type (not copy-paste) the entire Javascript (including "javascript:") into the address bar to execute Javascript - Chrome will strip the "javascript:" protocol specification and treat your Javascript as a search if your last action in the address bar is copy-pasting.
A more convenient way to execute arbitrary Javascript in Chrome would be to open the Javascript Console (Ctrl+Shift+J), however, the resizeTo()
function is not supported for tabs so you'll need to enter something creative in the console to make this work:
var myTestWindow = window.open(window.location); myTestWindow.resizeTo(1024,768);
(subsequent changes to the pop-up window's size can be made by calling myTestWindow.resizeTo(x,y)
)