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

Unified Diff: content/child/scheduler/worker_scheduler_impl_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/worker_scheduler_impl.cc ('k') | content/content_child.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/scheduler/worker_scheduler_impl_unittest.cc
diff --git a/content/child/scheduler/worker_scheduler_impl_unittest.cc b/content/child/scheduler/worker_scheduler_impl_unittest.cc
index eed8f55b3d523a1763a847c993616074643b965a..edeaa369bfe698b372f0802dd9ffb44d1c57040f 100644
--- a/content/child/scheduler/worker_scheduler_impl_unittest.cc
+++ b/content/child/scheduler/worker_scheduler_impl_unittest.cc
@@ -7,8 +7,10 @@
#include "base/callback.h"
#include "base/strings/stringprintf.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/test/test_time_source.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -103,7 +105,11 @@ class WorkerSchedulerImplTest : public testing::Test {
scheduler_(
new WorkerSchedulerImplForTest(nestable_task_runner_, clock_)),
timeline_(nullptr) {
- scheduler_->SetTimeSourceForTesting(clock_);
+ scheduler_->GetSchedulerHelperForTesting()->SetTimeSourceForTesting(
+ make_scoped_ptr(new TestTimeSource(clock_)));
+ scheduler_->GetSchedulerHelperForTesting()
+ ->GetTaskQueueManagerForTesting()
+ ->SetTimeSourceForTesting(make_scoped_ptr(new TestTimeSource(clock_)));
}
~WorkerSchedulerImplTest() override {}
« no previous file with comments | « content/child/scheduler/worker_scheduler_impl.cc ('k') | content/content_child.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698