diff options
author | fdoray <fdoray@chromium.org> | 2016-03-18 15:44:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-18 22:47:56 +0000 |
commit | 6477fbded94522e26875bbf405710060d01ea971 (patch) | |
tree | 944811ea09c89e188bfb6c05fd45f1384156971e /base/task_scheduler/test_utils.h | |
parent | 85d385a2ec9f6d365fee5a14fd2a5ea564ffb1a7 (diff) | |
download | chromium_src-6477fbded94522e26875bbf405710060d01ea971.zip chromium_src-6477fbded94522e26875bbf405710060d01ea971.tar.gz chromium_src-6477fbded94522e26875bbf405710060d01ea971.tar.bz2 |
TaskScheduler [4/9] Priority Queue
This change is a subset of https://codereview.chromium.org/1698183005/
A PriorityQueue holds Sequences of Tasks. It supports Push, Pop and
Peek operations through a Transaction object.
A SequenceSortKey must be provided to push a Sequence into a
PriorityQueue. Sequences are sorted according to their SequenceSortKey.
The SequenceSortKey of a Sequence never changes while it is in the
PriorityQueue (even if Tasks are pushed/popped from the Sequence).
BUG=553459
Review URL: https://codereview.chromium.org/1709713002
Cr-Commit-Position: refs/heads/master@{#382115}
Diffstat (limited to 'base/task_scheduler/test_utils.h')
-rw-r--r-- | base/task_scheduler/test_utils.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/base/task_scheduler/test_utils.h b/base/task_scheduler/test_utils.h new file mode 100644 index 0000000..bafd09a --- /dev/null +++ b/base/task_scheduler/test_utils.h @@ -0,0 +1,19 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef BASE_TASK_SCHEDULER_TEST_UTILS_H_ +#define BASE_TASK_SCHEDULER_TEST_UTILS_H_ + +#include "base/logging.h" +#include "build/build_config.h" +#include "testing/gtest/include/gtest/gtest.h" + +// Death tests misbehave on Android. +#if DCHECK_IS_ON() && defined(GTEST_HAS_DEATH_TEST) && !defined(OS_ANDROID) +#define EXPECT_DCHECK_DEATH(statement, regex) EXPECT_DEATH(statement, regex) +#else +#define EXPECT_DCHECK_DEATH(statement, regex) +#endif + +#endif // BASE_TASK_SCHEDULER_TEST_UTILS_H_ |