Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Unified Diff: base/test/task_runner_test_template.h

Issue 1705943002: TaskScheduler [5/9] Task Tracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s_3_pq
Patch Set: fix PostTask comment Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/test/task_runner_test_template.h
diff --git a/base/test/task_runner_test_template.h b/base/test/task_runner_test_template.h
index df42da6a8d3e855b312cd6b83137416bdb68153f..a56be239d8eed01eeae7efad8010c8cc06065554 100644
--- a/base/test/task_runner_test_template.h
+++ b/base/test/task_runner_test_template.h
@@ -72,7 +72,7 @@
namespace base {
-namespace internal {
+namespace testing {
gab 2016/03/01 22:18:47 Let's do this change in another CL -- feel free to
robliao 2016/03/01 22:29:42 Since this is base/test, this should probably be n
fdoray 2016/03/02 00:38:41 TODO(fdoray): Do this in another CL before sending
// Utility class that keeps track of how many times particular tasks
// are run.
@@ -105,14 +105,14 @@ class TaskTracker : public RefCountedThreadSafe<TaskTracker> {
DISALLOW_COPY_AND_ASSIGN(TaskTracker);
};
-} // namespace internal
+} // namespace testing
template <typename TaskRunnerTestDelegate>
-class TaskRunnerTest : public testing::Test {
+class TaskRunnerTest : public ::testing::Test {
protected:
- TaskRunnerTest() : task_tracker_(new internal::TaskTracker()) {}
+ TaskRunnerTest() : task_tracker_(new testing::TaskTracker()) {}
- const scoped_refptr<internal::TaskTracker> task_tracker_;
+ const scoped_refptr<testing::TaskTracker> task_tracker_;
TaskRunnerTestDelegate delegate_;
};
@@ -171,7 +171,7 @@ TYPED_TEST_P(TaskRunnerTest, Delayed) {
// task runner in order to be conformant.
REGISTER_TYPED_TEST_CASE_P(TaskRunnerTest, Basic, Delayed);
-namespace internal {
+namespace testing {
// Calls RunsTasksOnCurrentThread() on |task_runner| and expects it to
// equal |expected_value|.
@@ -179,7 +179,7 @@ void ExpectRunsTasksOnCurrentThread(
bool expected_value,
const scoped_refptr<TaskRunner>& task_runner);
-} // namespace internal
+} // namespace testing
template <typename TaskRunnerTestDelegate>
class TaskRunnerAffinityTest : public TaskRunnerTest<TaskRunnerTestDelegate> {};
@@ -203,12 +203,12 @@ TYPED_TEST_P(TaskRunnerAffinityTest, RunsTasksOnCurrentThread) {
for (int i = 0; i < 20; ++i) {
const Closure& ith_task_runner_task =
this->task_tracker_->WrapTask(
- Bind(&internal::ExpectRunsTasksOnCurrentThread,
+ Bind(&testing::ExpectRunsTasksOnCurrentThread,
true, task_runner),
i);
const Closure& ith_non_task_runner_task =
this->task_tracker_->WrapTask(
- Bind(&internal::ExpectRunsTasksOnCurrentThread,
+ Bind(&testing::ExpectRunsTasksOnCurrentThread,
false, task_runner),
i);
for (int j = 0; j < i + 1; ++j) {

Powered by Google App Engine
This is Rietveld 408576698