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

Side by Side Diff: third_party/WebKit/Source/platform/TimerTest.cpp

Issue 2437003002: [scheduler] Add type to scheduler::TaskQueue (Closed)
Patch Set: fix windows compilation Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/Timer.h" 5 #include "platform/Timer.h"
6 6
7 #include "platform/scheduler/base/task_queue_impl.h" 7 #include "platform/scheduler/base/task_queue_impl.h"
8 #include "platform/scheduler/child/web_task_runner_impl.h" 8 #include "platform/scheduler/child/web_task_runner_impl.h"
9 #include "platform/scheduler/renderer/renderer_scheduler_impl.h" 9 #include "platform/scheduler/renderer/renderer_scheduler_impl.h"
10 #include "platform/testing/TestingPlatformSupport.h" 10 #include "platform/testing/TestingPlatformSupport.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 TimerForTest(WebTaskRunner* webTaskRunner, 481 TimerForTest(WebTaskRunner* webTaskRunner,
482 TimerFiredClass* timerFiredClass, 482 TimerFiredClass* timerFiredClass,
483 TimerFiredFunction timerFiredFunction) 483 TimerFiredFunction timerFiredFunction)
484 : TaskRunnerTimer<TimerFiredClass>(webTaskRunner, 484 : TaskRunnerTimer<TimerFiredClass>(webTaskRunner,
485 timerFiredClass, 485 timerFiredClass,
486 timerFiredFunction) {} 486 timerFiredFunction) {}
487 }; 487 };
488 488
489 TEST_F(TimerTest, UserSuppliedWebTaskRunner) { 489 TEST_F(TimerTest, UserSuppliedWebTaskRunner) {
490 scoped_refptr<scheduler::TaskQueue> taskRunner( 490 scoped_refptr<scheduler::TaskQueue> taskRunner(
491 m_platform.rendererScheduler()->NewTimerTaskRunner("test")); 491 m_platform.rendererScheduler()->NewTimerTaskRunner(
492 scheduler::TaskQueue::QueueType::TEST));
492 scheduler::WebTaskRunnerImpl webTaskRunner(taskRunner); 493 scheduler::WebTaskRunnerImpl webTaskRunner(taskRunner);
493 TimerForTest<TimerTest> timer(&webTaskRunner, this, &TimerTest::countingTask); 494 TimerForTest<TimerTest> timer(&webTaskRunner, this, &TimerTest::countingTask);
494 timer.startOneShot(0, BLINK_FROM_HERE); 495 timer.startOneShot(0, BLINK_FROM_HERE);
495 496
496 // Make sure the task was posted on taskRunner. 497 // Make sure the task was posted on taskRunner.
497 EXPECT_FALSE(taskRunner->IsEmpty()); 498 EXPECT_FALSE(taskRunner->IsEmpty());
498 } 499 }
499 500
500 } // namespace 501 } // namespace
501 } // namespace blink 502 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698