New issue
Advanced search Search tips

Issue 748747 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug
Team-Security-UX


Show other hotlists

Hotlists containing this issue:
EnamelAndFriendsFixIt


Sign in to add a comment

DCHECK_CURRENTLY_ON misleading in important_sites_usage_counter_unittest.cc

Project Member Reported by btolsch@chromium.org, Jul 25 2017

Issue description

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.
 

Comment 1 by est...@chromium.org, Jul 31 2017

Components: Tests
Labels: M-62 OS-All
Owner: dominickn@chromium.org
Status: Assigned (was: Untriaged)
Dom, could you take a look please?
Labels: -OS-All OS-Android OS-Chrome OS-Linux OS-Mac OS-Windows
Thanks for the report. This is on my queue to take a look at, but it's low priority.

Comment 3 by est...@chromium.org, Nov 10 2017

Labels: Hotlist-EnamelAndFriendsFixIt
Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/afac65b656d03ff4a85c4aca3f3537d906d5490a

commit afac65b656d03ff4a85c4aca3f3537d906d5490a
Author: Dominick Ng <dominickn@chromium.org>
Date: Wed Nov 15 06:17:27 2017

Specify REAL_IO_THREAD in the TestBrowserThreadBundle for ImportantSitesUsageCounterTest.

BUG= 748747 

Change-Id: I890c1dd6596decb6266f2be7dd65485be0ba8139
Reviewed-on: https://chromium-review.googlesource.com/765614
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516597}
[modify] https://crrev.com/afac65b656d03ff4a85c4aca3f3537d906d5490a/chrome/browser/engagement/important_sites_usage_counter_unittest.cc

Status: Fixed (was: Started)
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5594923b09f14a45a3ce1ebe05646d865bc54a5d

commit 5594923b09f14a45a3ce1ebe05646d865bc54a5d
Author: Luna Lu <loonybear@chromium.org>
Date: Wed Nov 15 17:22:27 2017

Revert "Specify REAL_IO_THREAD in the TestBrowserThreadBundle for ImportantSitesUsageCounterTest."

This reverts commit afac65b656d03ff4a85c4aca3f3537d906d5490a.

Reason for revert: Suspect causing failure for ImportantSitesUsageCounterTest.PopulateUsage on Mac10.11 and Mac10.12

Original change's description:
> Specify REAL_IO_THREAD in the TestBrowserThreadBundle for ImportantSitesUsageCounterTest.
> 
> BUG= 748747 
> 
> Change-Id: I890c1dd6596decb6266f2be7dd65485be0ba8139
> Reviewed-on: https://chromium-review.googlesource.com/765614
> Reviewed-by: Ben Wells <benwells@chromium.org>
> Commit-Queue: Dominick Ng <dominickn@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#516597}

TBR=benwells@chromium.org,dominickn@chromium.org,btolsch@chromium.org

Change-Id: I76373692ba14421b6bed4c61088d4bdc6d7f0aea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  785296 
Reviewed-on: https://chromium-review.googlesource.com/772110
Reviewed-by: Luna Lu <loonybear@chromium.org>
Commit-Queue: Luna Lu <loonybear@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516730}
[modify] https://crrev.com/5594923b09f14a45a3ce1ebe05646d865bc54a5d/chrome/browser/engagement/important_sites_usage_counter_unittest.cc

Status: Started (was: Fixed)
Well, my attempt to fix this the right way didn't work. I'm just going to remove the DCHECK since other tests which exercise this code path don't both with real IO threads.
Project Member

Comment 9 by bugdroid1@chromium.org, Nov 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b87fb5b4dc0b5fdcdd20737d44581ca49ca45564

commit b87fb5b4dc0b5fdcdd20737d44581ca49ca45564
Author: Dominick Ng <dominickn@chromium.org>
Date: Thu Nov 16 00:16:16 2017

Remove misleading DCHECK in ImportantSitesUsageCounterTest.

TestBrowserThreadBundle runs all tasks on one thread and MessageLoop.
DCHECK_CURRENTLY_ON checks will always pass no matter the thread
specified, so they are not helpful in this situation.

BUG= 748747 

Change-Id: I8a4812fe49fac4d06eb8f02a09eb5667528f5d8c
Reviewed-on: https://chromium-review.googlesource.com/773318
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516912}
[modify] https://crrev.com/b87fb5b4dc0b5fdcdd20737d44581ca49ca45564/chrome/browser/engagement/important_sites_usage_counter_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment