arc: Make ARC related browser tests less flaky
Some ARC browser tests such as ArcAuthServiceTest.ChildTransition instantiates a profile and an ArcSessionManager object associated with the profile twice on purpose. On the other hand, ArcAppListPrefs object can be _asynchronously_ created while the first profile is in use. As a result, if the following happens, the DCHECK_EQ in the class fails, making such browser tests flaky: 1. The first profile is created. 2. The first ArcSessionManager is created. The first profile is associated with the manager. 3. A unrelated class e.g. ArcDefaultAppList does some PostTask operations. 4. The second profile is created. 5. The second ArcSessionManager is created. The second profile is associated with the (second) manager. 6. The PostTask operation finishes, and an ArcAppListPrefs object is created with the first profile. 7. The DCHECK_EQ fails. This CL changes the DCHECK_EQ to LOG(ERROR) to remove the race. BUG=b:144199481 TEST=try Change-Id: I0153a2ceba87c5a292b7b34f257e18868dc1f9bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2030002 Commit-Queue: Yusuke Sato <yusukes@chromium.org> Reviewed-by:Yury Khmel <khmel@chromium.org> Cr-Commit-Position: refs/heads/master@{#736911}
Showing
Please register or sign in to comment