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

Side by Side Diff: third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp

Issue 2812313002: [scheduler] Remove blink::scheduler::TaskQueue from public API. (Closed)
Patch Set: Rebased & addressed skyostil@'s comment Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 void TestingPlatformSupportWithMockScheduler::AdvanceClockSeconds( 290 void TestingPlatformSupportWithMockScheduler::AdvanceClockSeconds(
291 double seconds) { 291 double seconds) {
292 clock_->Advance(base::TimeDelta::FromSecondsD(seconds)); 292 clock_->Advance(base::TimeDelta::FromSecondsD(seconds));
293 } 293 }
294 294
295 void TestingPlatformSupportWithMockScheduler::SetAutoAdvanceNowToPendingTasks( 295 void TestingPlatformSupportWithMockScheduler::SetAutoAdvanceNowToPendingTasks(
296 bool auto_advance) { 296 bool auto_advance) {
297 mock_task_runner_->SetAutoAdvanceNowToPendingTasks(auto_advance); 297 mock_task_runner_->SetAutoAdvanceNowToPendingTasks(auto_advance);
298 } 298 }
299 299
300 scheduler::RendererScheduler* 300 scheduler::RendererSchedulerImpl*
301 TestingPlatformSupportWithMockScheduler::GetRendererScheduler() const { 301 TestingPlatformSupportWithMockScheduler::GetRendererScheduler() const {
302 return scheduler_.get(); 302 return scheduler_.get();
303 } 303 }
304 304
305 // static 305 // static
306 double TestingPlatformSupportWithMockScheduler::GetTestTime() { 306 double TestingPlatformSupportWithMockScheduler::GetTestTime() {
307 TestingPlatformSupportWithMockScheduler* platform = 307 TestingPlatformSupportWithMockScheduler* platform =
308 static_cast<TestingPlatformSupportWithMockScheduler*>( 308 static_cast<TestingPlatformSupportWithMockScheduler*>(
309 Platform::Current()); 309 Platform::Current());
310 return (platform->clock_->NowTicks() - base::TimeTicks()).InSecondsF(); 310 return (platform->clock_->NowTicks() - base::TimeTicks()).InSecondsF();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 ThreadState::AttachMainThread(); 350 ThreadState::AttachMainThread();
351 ThreadState::Current()->RegisterTraceDOMWrappers(nullptr, nullptr, nullptr, 351 ThreadState::Current()->RegisterTraceDOMWrappers(nullptr, nullptr, nullptr,
352 nullptr); 352 nullptr);
353 HTTPNames::init(); 353 HTTPNames::init();
354 FetchInitiatorTypeNames::init(); 354 FetchInitiatorTypeNames::init();
355 } 355 }
356 356
357 ScopedUnittestsEnvironmentSetup::~ScopedUnittestsEnvironmentSetup() {} 357 ScopedUnittestsEnvironmentSetup::~ScopedUnittestsEnvironmentSetup() {}
358 358
359 } // namespace blink 359 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698