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

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

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase 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/compositor_timing_history.cc ('k') | cc/scheduler/delay_based_time_source.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 "cc/scheduler/compositor_timing_history.h" 5 #include "cc/scheduler/compositor_timing_history.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "cc/debug/rendering_stats_instrumentation.h" 8 #include "cc/debug/rendering_stats_instrumentation.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 25 matching lines...) Expand all
36 timing_history_(this, rendering_stats_.get()) { 36 timing_history_(this, rendering_stats_.get()) {
37 AdvanceNowBy(base::TimeDelta::FromMilliseconds(1)); 37 AdvanceNowBy(base::TimeDelta::FromMilliseconds(1));
38 timing_history_.SetRecordingEnabled(true); 38 timing_history_.SetRecordingEnabled(true);
39 } 39 }
40 40
41 void AdvanceNowBy(base::TimeDelta delta) { now_ += delta; } 41 void AdvanceNowBy(base::TimeDelta delta) { now_ += delta; }
42 42
43 base::TimeTicks Now() { return now_; } 43 base::TimeTicks Now() { return now_; }
44 44
45 protected: 45 protected:
46 scoped_ptr<RenderingStatsInstrumentation> rendering_stats_; 46 std::unique_ptr<RenderingStatsInstrumentation> rendering_stats_;
47 TestCompositorTimingHistory timing_history_; 47 TestCompositorTimingHistory timing_history_;
48 base::TimeTicks now_; 48 base::TimeTicks now_;
49 }; 49 };
50 50
51 base::TimeTicks TestCompositorTimingHistory::Now() const { 51 base::TimeTicks TestCompositorTimingHistory::Now() const {
52 return test_->Now(); 52 return test_->Now();
53 } 53 }
54 54
55 TEST_F(CompositorTimingHistoryTest, AllSequential_Commit) { 55 TEST_F(CompositorTimingHistoryTest, AllSequential_Commit) {
56 base::TimeDelta one_second = base::TimeDelta::FromSeconds(1); 56 base::TimeDelta one_second = base::TimeDelta::FromSeconds(1);
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 base::TimeDelta begin_main_frame_to_commit_duration_expected_ = 294 base::TimeDelta begin_main_frame_to_commit_duration_expected_ =
295 begin_main_frame_queue_duration_critical + 295 begin_main_frame_queue_duration_critical +
296 begin_main_frame_start_to_commit_duration; 296 begin_main_frame_start_to_commit_duration;
297 EXPECT_EQ(begin_main_frame_to_commit_duration_expected_, 297 EXPECT_EQ(begin_main_frame_to_commit_duration_expected_,
298 timing_history_.BeginMainFrameToCommitDurationEstimate()); 298 timing_history_.BeginMainFrameToCommitDurationEstimate());
299 } 299 }
300 300
301 } // namespace 301 } // namespace
302 } // namespace cc 302 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/compositor_timing_history.cc ('k') | cc/scheduler/delay_based_time_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698