cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / components / scheduler / child / scheduler_task_runner_delegate_impl_unittest.cc
blob7e55a1242b3d94bc86d7b4818adb46a55ebca8e9
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.
5 #include "components/scheduler/child/scheduler_task_runner_delegate_impl.h"
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"
11 namespace scheduler {
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());
20 scoped_refptr<SchedulerTaskRunnerDelegateImpl> delegate(
21 SchedulerTaskRunnerDelegateImpl::Create(&loop));
22 delegate->SetDefaultTaskRunner(custom_runner);
23 DCHECK_EQ(custom_runner, loop.task_runner());
25 DCHECK_EQ(original_runner, loop.task_runner());
28 } // namespace scheduler