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

Unified Diff: content/child/scheduler/scheduler_helper_unittest.cc

Issue 1098033002: Remove dependency on cc::TestNowSource from scheduler code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 8 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
« no previous file with comments | « content/child/scheduler/scheduler_helper.cc ('k') | content/child/scheduler/task_queue_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/scheduler/scheduler_helper_unittest.cc
diff --git a/content/child/scheduler/scheduler_helper_unittest.cc b/content/child/scheduler/scheduler_helper_unittest.cc
index faeba6ba80175b2e6e30672f092307aa4cf6cdac..d3e9bda3e669aa6fc4881e1ebb8dcd050ffa68ad 100644
--- a/content/child/scheduler/scheduler_helper_unittest.cc
+++ b/content/child/scheduler/scheduler_helper_unittest.cc
@@ -6,8 +6,11 @@
#include "base/callback.h"
#include "cc/test/ordered_simple_task_runner.h"
+#include "cc/test/test_now_source.h"
#include "content/child/scheduler/nestable_task_runner_for_test.h"
#include "content/child/scheduler/scheduler_message_loop_delegate.h"
+#include "content/child/scheduler/task_queue_manager.h"
+#include "content/test/test_time_source.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -151,7 +154,10 @@ class BaseSchedulerHelperTest : public testing::Test {
required_quiescence_duration_before_long_idle_period)),
default_task_runner_(scheduler_helper_->DefaultTaskRunner()),
idle_task_runner_(scheduler_helper_->IdleTaskRunner()) {
- scheduler_helper_->SetTimeSourceForTesting(clock_);
+ scheduler_helper_->SetTimeSourceForTesting(
+ make_scoped_ptr(new TestTimeSource(clock_)));
+ scheduler_helper_->GetTaskQueueManagerForTesting()->SetTimeSourceForTesting(
+ make_scoped_ptr(new TestTimeSource(clock_)));
}
~BaseSchedulerHelperTest() override {}
« no previous file with comments | « content/child/scheduler/scheduler_helper.cc ('k') | content/child/scheduler/task_queue_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698