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

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

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 // 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 bool will_begin_impl_frame_causes_redraw_; 200 bool will_begin_impl_frame_causes_redraw_;
201 bool will_begin_impl_frame_requests_one_begin_impl_frame_; 201 bool will_begin_impl_frame_requests_one_begin_impl_frame_;
202 bool draw_will_happen_; 202 bool draw_will_happen_;
203 bool swap_will_happen_if_draw_happens_; 203 bool swap_will_happen_if_draw_happens_;
204 bool automatic_swap_ack_; 204 bool automatic_swap_ack_;
205 int num_draws_; 205 int num_draws_;
206 BeginFrameArgs begin_frame_args_sent_to_children_; 206 BeginFrameArgs begin_frame_args_sent_to_children_;
207 BeginFrameArgs last_begin_main_frame_args_; 207 BeginFrameArgs last_begin_main_frame_args_;
208 base::TimeTicks posted_begin_impl_frame_deadline_; 208 base::TimeTicks posted_begin_impl_frame_deadline_;
209 std::vector<const char*> actions_; 209 std::vector<const char*> actions_;
210 std::vector<scoped_refptr<base::trace_event::ConvertableToTraceFormat>> 210 std::vector<scoped_ptr<base::trace_event::ConvertableToTraceFormat>> states_;
211 states_;
212 TestScheduler* scheduler_; 211 TestScheduler* scheduler_;
213 }; 212 };
214 213
215 class FakeExternalBeginFrameSource : public BeginFrameSourceBase { 214 class FakeExternalBeginFrameSource : public BeginFrameSourceBase {
216 public: 215 public:
217 explicit FakeExternalBeginFrameSource(FakeSchedulerClient* client) 216 explicit FakeExternalBeginFrameSource(FakeSchedulerClient* client)
218 : client_(client) {} 217 : client_(client) {}
219 ~FakeExternalBeginFrameSource() override {} 218 ~FakeExternalBeginFrameSource() override {}
220 219
221 void AddObserver(BeginFrameObserver* obs) override { 220 void AddObserver(BeginFrameObserver* obs) override {
(...skipping 3454 matching lines...) Expand 10 before | Expand all | Expand 10 after
3676 } 3675 }
3677 3676
3678 TEST_F(SchedulerTest, BeginMainFrameOnCriticalPath_AHS) { 3677 TEST_F(SchedulerTest, BeginMainFrameOnCriticalPath_AHS) {
3679 EXPECT_FALSE(BeginMainFrameOnCriticalPath( 3678 EXPECT_FALSE(BeginMainFrameOnCriticalPath(
3680 SMOOTHNESS_TAKES_PRIORITY, 3679 SMOOTHNESS_TAKES_PRIORITY,
3681 ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER, kSlowDuration)); 3680 ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER, kSlowDuration));
3682 } 3681 }
3683 3682
3684 } // namespace 3683 } // namespace
3685 } // namespace cc 3684 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698