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

Side by Side Diff: cc/scheduler/scheduler_unittest.cc

Issue 1840223002: cc: Remove BeginFrameSource::Create methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test BFS and mus too Created 4 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
« no previous file with comments | « cc/scheduler/begin_frame_source_unittest.cc ('k') | cc/surfaces/display_scheduler.cc » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/scheduler/scheduler.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 now_src_->Advance(base::TimeDelta::FromMilliseconds(100)); 250 now_src_->Advance(base::TimeDelta::FromMilliseconds(100));
251 // Fail if we need to run 100 tasks in a row. 251 // Fail if we need to run 100 tasks in a row.
252 task_runner_->SetRunTaskLimit(100); 252 task_runner_->SetRunTaskLimit(100);
253 } 253 }
254 254
255 ~SchedulerTest() override {} 255 ~SchedulerTest() override {}
256 256
257 protected: 257 protected:
258 TestScheduler* CreateScheduler() { 258 TestScheduler* CreateScheduler() {
259 BeginFrameSource* frame_source; 259 BeginFrameSource* frame_source;
260 unthrottled_frame_source_ = TestBackToBackBeginFrameSource::Create( 260 unthrottled_frame_source_.reset(
261 now_src_.get(), task_runner_.get()); 261 new TestBackToBackBeginFrameSource(now_src_.get(), task_runner_.get()));
262 fake_external_begin_frame_source_.reset( 262 fake_external_begin_frame_source_.reset(
263 new FakeExternalBeginFrameSource(client_.get())); 263 new FakeExternalBeginFrameSource(client_.get()));
264 synthetic_frame_source_ = TestSyntheticBeginFrameSource::Create( 264 synthetic_frame_source_.reset(new TestSyntheticBeginFrameSource(
265 now_src_.get(), task_runner_.get(), BeginFrameArgs::DefaultInterval()); 265 now_src_.get(), task_runner_.get(), BeginFrameArgs::DefaultInterval()));
266 if (!scheduler_settings_.throttle_frame_production) { 266 if (!scheduler_settings_.throttle_frame_production) {
267 frame_source = unthrottled_frame_source_.get(); 267 frame_source = unthrottled_frame_source_.get();
268 } else if (scheduler_settings_.use_external_begin_frame_source) { 268 } else if (scheduler_settings_.use_external_begin_frame_source) {
269 frame_source = fake_external_begin_frame_source_.get(); 269 frame_source = fake_external_begin_frame_source_.get();
270 } else { 270 } else {
271 frame_source = synthetic_frame_source_.get(); 271 frame_source = synthetic_frame_source_.get();
272 } 272 }
273 273
274 scoped_ptr<FakeCompositorTimingHistory> fake_compositor_timing_history = 274 scoped_ptr<FakeCompositorTimingHistory> fake_compositor_timing_history =
275 FakeCompositorTimingHistory::Create( 275 FakeCompositorTimingHistory::Create(
(...skipping 3574 matching lines...) Expand 10 before | Expand all | Expand 10 after
3850 } 3850 }
3851 3851
3852 TEST_F(SchedulerTest, BeginMainFrameOnCriticalPath_AHS) { 3852 TEST_F(SchedulerTest, BeginMainFrameOnCriticalPath_AHS) {
3853 EXPECT_FALSE(BeginMainFrameOnCriticalPath( 3853 EXPECT_FALSE(BeginMainFrameOnCriticalPath(
3854 SMOOTHNESS_TAKES_PRIORITY, 3854 SMOOTHNESS_TAKES_PRIORITY,
3855 ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER, kSlowDuration)); 3855 ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER, kSlowDuration));
3856 } 3856 }
3857 3857
3858 } // namespace 3858 } // namespace
3859 } // namespace cc 3859 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/begin_frame_source_unittest.cc ('k') | cc/surfaces/display_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698