Move EXPECT_DCHECK_DEATH from base/task_scheduler and use it in relevant base/ tests
Extracted from https://codereview.chromium.org/2163023002/
This has the following advantages:
- Reduces inconsistent usage of #if preprocessors macros for death tests.
- Enables some tests when DCHECK_ALWAYS_ON in Release builds
that were previously not (per aforementioned inconsistency)
- Runs those tests anyways (modulo call expected to die) in non-DCHECK
builds -- resulting in extra coverage (though sometimes mostly a no-op).
TODO(gab): Try to enable death tests on OS_ANDROID in a follow-up CL and document what breaks.
BUG=622400
(relation to that bug is the attempt to open as many tests as possible
to Release+DCHECK_ALWAYS_ON started in https://codereview.chromium.org/2163023002/
as a safety measure for the impl for 622400)
Review-Url: https://codereview.chromium.org/2162053006
Cr-Commit-Position: refs/heads/master@{#408978}
CrOS-Libchrome-Original-Commit: c964a852c558c9876e49b1bcea0d98c720b5b300
19 files changed