DCHECK_CURRENTLY_ON misleading in chrome_signin_helper_unittest.cc |
||||
Issue descriptionVersion: 62.0.3167.0 DCHECK_CURRENTLY_ON will succeed for any thread label when run with TestBrowserThreadBundle with no additional threads because TestBrowserThreadBundle runs everything in one thread and MessageLoop.
,
Aug 16 2017
btolsch@chromium.org: Why is this bug associated with component Services > Sign in?
,
Aug 16 2017
msarda: this is in chrome_signin_helper_unittest, which is signin code. I am really not convinced that this is true though: "DCHECK_CURRENTLY_ON will succeed for any thread label"
,
Aug 16 2017
,
Aug 16 2017
I tried and indeed it seems that these DCHECKs don't fire in tests. This is a recent change right? I remember spending a lot of time writing this test because of this kind of assertions, and had to setup the test to run on two threads to avoid DCHECKs all over the place. But now it seems I can just run all the IO related code on the UI thread and nothing complains.
,
Aug 16 2017
,
Aug 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ce4a4f9650be43d6f81bf2068cd59ceb15ce46c7 commit ce4a4f9650be43d6f81bf2068cd59ceb15ce46c7 Author: David Roger <droger@chromium.org> Date: Thu Aug 17 15:07:55 2017 [signin] Simplify threading in ChromeSigninHelper unit test This CL removes all the thread-hopping from the test, because it is unnecessary. Everything that was done on the IO thread is now done on the main thread, and all the synchronization code is removed. Bug: 748755 Change-Id: I887818304e7535a77b6810ae2bda7d6e9a005479 Reviewed-on: https://chromium-review.googlesource.com/616725 Reviewed-by: Mihai Sardarescu <msarda@chromium.org> Commit-Queue: David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/master@{#495175} [modify] https://crrev.com/ce4a4f9650be43d6f81bf2068cd59ceb15ce46c7/chrome/browser/signin/chrome_signin_helper_unittest.cc
,
Aug 18 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by sheriffbot@chromium.org
, Aug 9 2017Status: Available (was: Untriaged)