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

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: 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
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..68031317f9c794303c9f24b5482ea7cfab60405f 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,8 @@ class WorkerSchedulerImplTest : public testing::Test {
scheduler_(
new WorkerSchedulerImplForTest(nestable_task_runner_, clock_)),
timeline_(nullptr) {
- scheduler_->SetTimeSourceForTesting(clock_);
+ scheduler_->SetTimeSourceForTesting(
+ make_scoped_ptr(new TestTimeSource(clock_)));
}
~WorkerSchedulerImplTest() override {}

Powered by Google App Engine
This is Rietveld 408576698