diff options
author | tapted <tapted@chromium.org> | 2014-09-24 00:40:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-24 07:40:54 +0000 |
commit | a40c605b9f633c7e2022be24aff5705ef0f89777 (patch) | |
tree | d01c494997feb8122f67dc9d0d0b67a351b0f33c /device | |
parent | 027d34b737abac0f1a0f7ccb853036968cfbcdea (diff) | |
download | chromium_src-a40c605b9f633c7e2022be24aff5705ef0f89777.zip chromium_src-a40c605b9f633c7e2022be24aff5705ef0f89777.tar.gz chromium_src-a40c605b9f633c7e2022be24aff5705ef0f89777.tar.bz2 |
For Mac, add AppListViewDelegateObserver::OnShutdown; deflake tests
We used to just leak everything on Mac. Since r295194, we clean up
references to Profiles being deleted, in Chrome's AppListViewDelegate.
This has caught out the Mac app list trying to access stuff it shouldn't
if Cocoa is still drawing it while Chrome is shutting down. Tests
started failing flakily.
This CL adds AppListViewDelegateObserver::OnShutdown to that Chrome's
AppListViewDelegate can notify the AppListView that it's shutting down.
On Views platforms, the Widget is just closed (which also happens just
after the chrome::NOTIFICATION_APP_TERMINATING broadcast). However, (a)
Cocoa doesn't have a `CloseAllSecondaryWidgets` call to trigger this and
(b) just closing the NSWindow isn't usually enough on Cocoa to avoid
accessing C++ objects due to reference counting.
We could also go through the platform-specific AppListService (e.g. by
passing in the AppListService that creates a Chrome
AppListViewDelegate), but this seemed neater.
This de-flakes a bunch of applist tests on Mac. The Mac-specific
ShowAppListUsingShim test is also augmented with extra checks for the
OnShutdown stuff.
BUG=415264
TEST=AppListServiceMacInteractiveTest.ShowAppListUsingShim,
AppListServiceInteractiveTest.*
Review URL: https://codereview.chromium.org/593563002
Cr-Commit-Position: refs/heads/master@{#296363}
Diffstat (limited to 'device')
0 files changed, 0 insertions, 0 deletions