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

Side by Side Diff: components/scheduler/child/scheduler_task_runner_delegate_impl_unittest.cc

Issue 1424053002: Adds a flag to support "Virtual Time" to the blink scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/scheduler/child/scheduler_task_runner_delegate_impl.h"
6
7 #include "base/message_loop/message_loop.h"
8 #include "base/test/test_simple_task_runner.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 namespace scheduler {
12
13 TEST(SchedulerTaskRunnerDelegateImplTest, TestTaskRunnerOverriding) {
14 base::MessageLoop loop;
15 scoped_refptr<base::SingleThreadTaskRunner> original_runner(
16 loop.task_runner());
17 scoped_refptr<base::SingleThreadTaskRunner> custom_runner(
18 new base::TestSimpleTaskRunner());
19 {
20 scoped_refptr<SchedulerTaskRunnerDelegateImpl> delegate(
21 SchedulerTaskRunnerDelegateImpl::Create(&loop));
22 delegate->SetDefaultTaskRunner(custom_runner);
23 DCHECK_EQ(custom_runner, loop.task_runner());
24 }
25 DCHECK_EQ(original_runner, loop.task_runner());
26 }
27
28 } // namespace scheduler
OLDNEW
« no previous file with comments | « components/scheduler/child/scheduler_task_runner_delegate_impl.cc ('k') | components/scheduler/child/scheduler_tqm_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698