[rAC, OSX] Force better initial size for sign-in (2nd try)
commitd28775d2e8c2538a0bbea0fcb6f341a8ae861026
authorgroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 16 Dec 2013 20:35:18 +0000 (16 20:35 +0000)
committergroby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 16 Dec 2013 20:35:18 +0000 (16 20:35 +0000)
tree71012f85de71daa0f70f21dc52d84382b3f6d2c7
parente1ff4a4ae373958c2e964e57d9b07a76c20065e6
[rAC, OSX] Force better initial size for sign-in (2nd try)

This is a re-land of http://crrev.com/103853004 (r240566), which was
reverted in http://crrev.com/113913008 (r240603)

The revert was due to a test failure with the root cause that
AutofillDialogBrowserTest shows the dialog, but never runs the
NSRunLoop - which means the visual display is not fully updated. And
showing the sign-in dialog requires the main dialog's size to be non-
zero.

Fixes added:
* AutofillSignInDelegate DCHECKs for invalid sizes (better callstacks)
* AutofillDialogBrowserTest cycles run loops whenever dialog is shown

---- original description ----
Open the sign-in dialog with an initial size equal to the current
dialog. This avoids one unnecessary resize until the content is loaded
and makes the visual experience less jarring.
---- end original description ----

TBR=jochen@chromium.org
R=isherman@chromium.org
BUG=325518

Review URL: https://codereview.chromium.org/97993006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241009 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/ui/autofill/autofill_dialog_controller_browsertest.cc
chrome/browser/ui/autofill/autofill_dialog_sign_in_delegate.cc
chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm
chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.mm