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

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

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/scheduler.cc ('k') | cc/surfaces/surface_aggregator_unittest.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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 namespace { 52 namespace {
53 53
54 class FakeSchedulerClient; 54 class FakeSchedulerClient;
55 55
56 class FakeSchedulerClient : public SchedulerClient { 56 class FakeSchedulerClient : public SchedulerClient {
57 public: 57 public:
58 class FakeExternalBeginFrameSource : public BeginFrameSourceMixIn { 58 class FakeExternalBeginFrameSource : public BeginFrameSourceMixIn {
59 public: 59 public:
60 explicit FakeExternalBeginFrameSource(FakeSchedulerClient* client) 60 explicit FakeExternalBeginFrameSource(FakeSchedulerClient* client)
61 : client_(client) {} 61 : client_(client) {}
62 virtual ~FakeExternalBeginFrameSource() {} 62 ~FakeExternalBeginFrameSource() override {}
63 63
64 void OnNeedsBeginFramesChange(bool needs_begin_frames) override { 64 void OnNeedsBeginFramesChange(bool needs_begin_frames) override {
65 if (needs_begin_frames) { 65 if (needs_begin_frames) {
66 client_->PushAction("SetNeedsBeginFrames(true)"); 66 client_->PushAction("SetNeedsBeginFrames(true)");
67 } else { 67 } else {
68 client_->PushAction("SetNeedsBeginFrames(false)"); 68 client_->PushAction("SetNeedsBeginFrames(false)");
69 } 69 }
70 client_->states_.push_back(client_->scheduler_->AsValue()); 70 client_->states_.push_back(client_->scheduler_->AsValue());
71 } 71 }
72 72
(...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 2195
2196 // Deadline task is pending 2196 // Deadline task is pending
2197 EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending()); 2197 EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
2198 client.task_runner().RunPendingTasks(); 2198 client.task_runner().RunPendingTasks();
2199 // Deadline task runs immediately 2199 // Deadline task runs immediately
2200 EXPECT_FALSE(scheduler->BeginImplFrameDeadlinePending()); 2200 EXPECT_FALSE(scheduler->BeginImplFrameDeadlinePending());
2201 } 2201 }
2202 2202
2203 } // namespace 2203 } // namespace
2204 } // namespace cc 2204 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698