DescriptionDeflake PushMessagingBrowserTest.DenyPushPermissionUnregisters & friends
PushMessagingServiceImpl::OnContentSettingChanged calls
PushMessagingService::GetSenderId which hops to the IO thread and
performs an asynchronous database lookup before finally calling
PushMessagingService::ClearPushRegistrationID on the UI thread.
This patch de-flakes a bunch of tests which depend on this sequence
of tasks having completed, by adding (and using) a
PushMessagingServiceImpl::SetContentSettingChangedCallbackForTesting
method which allows tests to wait until the sequence of tasks is
complete.
BUG=464710
Committed: https://crrev.com/6d9e37311bba05586e48560f1e762ada24d17b25
Cr-Commit-Position: refs/heads/master@{#320512}
Patch Set 1 #
Total comments: 1
Patch Set 2 : Use RunLoop directly #Patch Set 3 : Fix app id lifetime, and simplify usage #
Total comments: 1
Patch Set 4 : Total rewrite: use callbacks to guarantee termination #
Total comments: 6
Patch Set 5 : Address Bernhard's review comments #Patch Set 6 : Fix compile #
Total comments: 2
Patch Set 7 : Address Bernhard's nit #
Total comments: 2
Patch Set 8 : RunLoop -> MessageLoopRunner #Patch Set 9 : Use scoped_refptr #
Messages
Total messages: 18 (4 generated)
|