[Mac] Fix the problem that a popup could be closed while it is still in animation.
commit0323baf298763af020217eb11b0e86ac7a0e260a
authorjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 20 Jun 2013 17:20:52 +0000 (20 17:20 +0000)
committerjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 20 Jun 2013 17:20:52 +0000 (20 17:20 +0000)
tree54d585dea9a4fb3564cf25bb4e0d0e9d77cd3b74
parent8b5f65cf3184fc62006ca13d218b31fd88b3c0dd
[Mac] Fix the problem that a popup could be closed while it is still in animation.

This occurs when the test code creates a popup and close the collection immediately. The fix is to close the popup without animation for this case.

All the popup animations are coordinated by the popup collection. Added DCHECKs in the popup controller to guard the places that might trigger the 2nd animation while the previous animation has not ended.

BUG=249131
TEST=reenable the disabled test
R=dewittj@chromium.org, rsesek@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207470 0039d316-1c4b-4281-b951-d872f2087c98
ui/message_center/cocoa/popup_collection.mm
ui/message_center/cocoa/popup_collection_unittest.mm
ui/message_center/cocoa/popup_controller.mm